moonbitlang/pdflite/content/colour does not have a README file

    PdfContentColour

    pub(all) enum PdfContentColour {
    PdfContentGrey(Double)
    PdfContentRGB(Double, Double, Double)
    PdfContentCMYK(Double, Double, Double, Double)
    } derive(Eq, ToJson,
    Debug
    )

    Colour value used by cpdf-style content colour rewrite operations.

    PdfContentColour::equal

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfContentColour::equal(PdfContentColour, PdfContentColour) -> Bool

    PdfContentColour::not_equal

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfContentColour::not_equal(x : PdfContentColour, y : PdfContentColour) -> Bool

    PdfContentColour::to_draw_colour

    fn PdfContentColour::to_draw_colour(self : PdfContentColour) -> PdfDrawColour

    Convert a cpdf content colour into the draw colour variant.

    PdfContentColour::to_json

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfContentColour::to_json(PdfContentColour) -> Json

    PdfContentColour::to_repr

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfContentColour::to_repr(PdfContentColour) ->
    Repr

    PdfDrawColour

    pub(all) enum PdfDrawColour {
    PdfDrawNoCol
    PdfDrawRGB(Double, Double, Double)
    PdfDrawGrey(Double)
    PdfDrawCYMK(Double, Double, Double, Double)
    } derive(Eq, ToJson,
    Debug
    )

    Colour specification used by cpdf draw operations.

    The CYMK spelling follows the OCaml source variant name in cpdfdraw.ml.

    PdfDrawColour::equal

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfDrawColour::equal(PdfDrawColour, PdfDrawColour) -> Bool

    PdfDrawColour::not_equal

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfDrawColour::not_equal(x : PdfDrawColour, y : PdfDrawColour) -> Bool

    PdfDrawColour::to_json

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfDrawColour::to_json(PdfDrawColour) -> Json

    PdfDrawColour::to_repr

    #deprecated("implicit trait-method promotion is being removed; call via the trait")
    fn PdfDrawColour::to_repr(PdfDrawColour) ->
    Repr

    pdf_colours

    fn pdf_colours() -> Array[(String, Int)]

    Source-spelled compatibility alias for cpdfcolours' colour table.

    pdf_content_black

    let pdf_content_black : PdfContentColour

    The default black content colour.

    pdf_css_colour_value

    fn pdf_css_colour_value(name : String) -> Int?

    Look up a CSS color by name using cpdf's lowercase color table.

    pdf_css_colours

    fn pdf_css_colours() -> Array[(String, Int)]

    Return the cpdf CSS color table as lowercase names paired with RGB integers.

    pdf_draw_colour_of_string

    fn pdf_draw_colour_of_string(text : String) -> PdfDrawColour

    Parse a cpdf draw colour, returning PdfDrawNoCol on malformed input.

    pdf_parse_colour

    fn pdf_parse_colour(text : String) -> PdfContentColour raise
    PdfError

    Source-spelled compatibility wrapper for cpdfdrawcontrol's parse_colour.

    pdf_parse_content_colour

    fn pdf_parse_content_colour(text : String) -> PdfContentColour raise
    PdfError

    Parse a cpdf draw/add-text colour argument.

    CSS colour names are converted to RGB values in the range 0.0..1.0. Numeric arguments follow cpdf's arity convention: one number is gray, three numbers are RGB, and four numbers are CMYK.

    pdf_parse_draw_colour

    fn pdf_parse_draw_colour(text : String) -> PdfDrawColour raise
    PdfError

    Parse a cpdf draw-control colour argument.

    This ports cpdfdrawcontrol.ml's parse_colour/col_of_string path while preserving the draw-layer NoCol sentinel separately from content colours.