Skip to main content

Crate iced_color_wheel

Crate iced_color_wheel 

Source
Expand description

A circular HSV color wheel widget for Iced.

Renders a hue/saturation wheel (angle = hue, distance = saturation) with click-and-drag interaction. Pair with a brightness slider for full HSV control.

§Usage

use iced::widget::canvas;
use iced_color_wheel::WheelProgram;

// In your view function:
let wheel = canvas(WheelProgram::new(hue, saturation, value, |h, s| {
    MyMessage::HueSatChanged(h, s)
}))
.width(250)
.height(250);

Structs§

WheelProgram
A circular HSV color wheel canvas program for Iced.
WheelState
Internal canvas state (persists across frames).

Functions§

color_to_hsv
Convert iced::Color to HSV (h: 0-360, s: 0-1, v: 0-1).
hex_to_color
Parse a hex string (#RRGGBB or RRGGBB) to iced::Color.
hsv_to_color
Convert HSV (h: 0-360, s: 0-1, v: 0-1) to iced::Color.
hsv_to_hex
Convert HSV to hex string (#RRGGBB).