bobzhang/p5/color does not have a README file
type ColorMaxes = FixedArray[(Double, Double)]pub struct Color {
// private fields
}test {
let a = @color.Color::rgb(255, 0, 0)
let b = @color.Color::rgb(0, 0, 255)
inspect(a.lerp(b, 0.5).to_css(), content="#7f007f")
}test {
inspect(@color.Color::parse("tomato").unwrap().to_css(), content="#ff6347")
inspect(@color.Color::parse("#0f08").unwrap().to_css(), content="#00ff0088")
inspect(
@color.Color::parse("rgb(255 0 0 / 50%)").unwrap().to_css(),
content="#ff00007f",
)
inspect(
@color.Color::parse("hsl(120, 100%, 50%)").unwrap().mode(),
content="hsl",
)
}test {
inspect(@color.Color::rgb(255, 128, 0).to_css(), content="#ff8000")
inspect(@color.Color::rgb(255, 0, 0, alpha=128).to_css(), content="#ff000080")
}pub(all) struct ContrastReport {
wcag21 : Double
wcag21_passed_minimum : Bool
wcag21_passed_aaa : Bool
apca : Double
apca_passed_minimum : Bool
} derive(Debug)fn maxes(c0 : Double, c1 : Double, c2 : Double, alpha : Double) -> FixedArray[(Double, Double)]Install
Download zipA port of p5.js 2.x to MoonBit (JS backend): 2D canvas and WEBGL, fonts, SVG, GIF, shaders; pixel-identical with p5.js on its parity suite.