Skip to content

Parse highlight colour #38

@ricklupton

Description

@ricklupton
          Another related question:

Some of the highlight color info is currently in the extra value, I have to do this to get the color code:

def get_color(
    block: SceneLineItemBlock | SceneGlyphItemBlock,
) -> tuple[int, int, int, int]:
    if block.extra_data and len(block.extra_data) >= 5:
        *_, b, g, r, a = block.extra_data
        return (r, g, b, a)

    r, g, b = remarkable_palette[block.item.value.color]
    return (r, g, b, 255)

Should I create a PR here or in rmscene?

Originally posted by @ChenghaoMou in ricklupton/rmc#18 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions