1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// #![forbid(missing_docs)]
// #![forbid(missing_crate_level_docs)]
// #![forbid(missing_debug_implementations)]
// #![forbid(missing_doc_code_examples)]
// #![doc = include_str!("../readme.md")]
//
// pub use color_core::*;
// pub use color_macro::*;


use color_core::{RGBA, RGBA32};

pub trait ColorGradient {
    /// Get the color at the given position.
    ///
    /// # Arguments
    ///
    /// * `position` - The position of the color in the gradient.
    ///
    /// # Returns
    ///
    /// The color at the given position.
    fn get_color(&self, position: f32) -> RGBA;
}

pub struct ColorPicker {
    gradient: Box<dyn ColorGradient>,
    min: f32,
    max: f32,
}