#global #winapi #color #system-wide #windows #api-bindings

win-color

A Rust library for managing and manipulating colors in Windows applications, providing high-level abstractions for color handling, gradient creation, and direct integration with Direct2D

4 releases

new 0.0.4 Dec 11, 2024
0.0.3 Dec 11, 2024
0.0.2 Dec 8, 2024
0.0.1 Dec 7, 2024

#121 in Windows APIs

Download history 186/week @ 2024-12-02 367/week @ 2024-12-09

553 downloads per month

MIT license

63KB
914 lines

win-color

Coming Soon


lib.rs:

This module defines structures and utilities for managing colors in a Windows environment using Direct2D.

It includes functionality for handling both solid colors and gradients, allowing the creation, manipulation, and rendering of color values with Direct2D brushes.

The module provides:

  • Representation of solid colors using Solid struct.
  • Representation of gradient colors using the Gradient struct, including customizable direction and color stops.
  • Enums like Color and GlobalColor to abstract different color types and their sources, such as strings or gradient mappings.
  • Methods for converting these color types into Direct2D brushes for rendering, as well as handling opacity and transformations.

Dependencies

~131MB
~2M SLoC