Skip to main content

Module color

Module color 

Source
Expand description

Color conversion between cotis and wgpu representations.

Cotis cotis_defaults::colors::Color stores each channel as f32 in the 0..=255 range. This module normalizes channels to 0.0..=1.0 for GPU use.

Alpha handling differs by consumer:

Functions§

cotis_color_to_ui_color
Converts a cotis RGBA color (0..255 per channel) into normalized GPU color components.
cotis_color_to_wgpu
Converts a cotis RGBA color into a wgpu clear/present color (0.0..=1.0 per channel).