bobzhang/vg/color does not have a README file

    Color

    pub struct Color {
    r : Double
    g : Double
    b : Double
    a : Double
    } derive(Eq,
    Debug
    )

    RGBA color representation

    Color::equal

    fn Color::equal(Color, Color) -> Bool

    Keep Color::equal / Color::not_equal / Color::to_repr available as regular methods (the implicit impl-to-method promotion is deprecated).

    Color::not_equal

    fn Color::not_equal(x : Color, y : Color) -> Bool

    Keep Color::equal / Color::not_equal / Color::to_repr available as regular methods (the implicit impl-to-method promotion is deprecated).

    Color::to_repr

    black

    fn black() -> Color

    blend

    fn blend(c1 : Color, c2 : Color) -> Color

    Blend two colors using alpha compositing

    blue

    fn blue() -> Color

    clamp

    fn clamp(c : Color) -> Color

    Clamp color components to valid range [0.0, 1.0]

    cyan

    fn cyan() -> Color

    gold

    fn gold() -> Color

    gray

    fn gray(value : Double) -> Color

    Create a grayscale color

    green

    fn green() -> Color

    hard_light_blend

    fn hard_light_blend(c1 : Color, c2 : Color) -> Color

    Hard light blend mode

    hsv

    fn hsv(h : Double, s : Double, v : Double) -> Color

    Create color from HSV (Hue, Saturation, Value)

    lerp_color

    fn lerp_color(c1 : Color, c2 : Color, t : Double) -> Color

    Interpolate between two colors

    magenta

    fn magenta() -> Color

    multiply_blend

    fn multiply_blend(c1 : Color, c2 : Color) -> Color

    Multiply blend mode

    orange

    fn orange() -> Color

    overlay_blend

    fn overlay_blend(c1 : Color, c2 : Color) -> Color

    Overlay blend mode

    purple

    fn purple() -> Color

    red

    fn red() -> Color

    rgb

    fn rgb(r : Double, g : Double, b : Double) -> Color

    Create a color from RGB components (alpha = 1.0)

    rgba

    fn rgba(r : Double, g : Double, b : Double, a : Double) -> Color

    Create a color from RGBA components

    scale

    fn scale(c : Color, factor : Double) -> Color

    Multiply color by a scalar

    screen_blend

    fn screen_blend(c1 : Color, c2 : Color) -> Color

    Screen blend mode

    soft_light_blend

    fn soft_light_blend(c1 : Color, c2 : Color) -> Color

    Soft light blend mode

    to_hex

    fn to_hex(c : Color) -> String

    Convert color to hex string

    transparent

    fn transparent() -> Color

    Transparent color

    white

    fn white() -> Color

    yellow

    fn yellow() -> Color

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io