Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highlight colour once rmscene is updated #20

Open
ricklupton opened this issue Dec 2, 2024 · 1 comment
Open

Fix highlight colour once rmscene is updated #20

ricklupton opened this issue Dec 2, 2024 · 1 comment

Comments

@ricklupton
Copy link
Owner

          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 #18 (comment)

@ricklupton
Copy link
Owner Author

See ricklupton/rmscene#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant