#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

12 releases

0.1.7 Jan 8, 2025
0.1.5 Jan 7, 2025
0.1.1 Dec 28, 2024
0.0.5 Dec 19, 2024

#126 in Windows APIs

Download history 205/week @ 2024-12-04 251/week @ 2024-12-11 219/week @ 2024-12-18 144/week @ 2024-12-25 323/week @ 2025-01-01 321/week @ 2025-01-08

1,008 downloads per month

MIT license

33KB
454 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