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

Add methods for generating colors for clone IDs. #172

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aholmes
Copy link
Member

@aholmes aholmes commented Mar 6, 2025

These methods are used to generate a sequence of colors, maintaining an optional sequence of colors in the same order specified.

This means, for example, a sequence of 4 clone IDs c('a','b','c','d') and 2 colors c('red', 'black'), will return a new vector c(a='red', b='black', c='random color', d='random color').

See example usage.

get.clone.colours and get.clone.colours.in.order default to returning NULL when no sequence of initial colors are specified. This allows developers to pass the color result straight into BPG, allowing it to select colors itself, without requiring a check for NULL or some other odd color values.

@aholmes aholmes force-pushed the aholmes-add-clone-color-methods branch 6 times, most recently from 8c532f8 to ea2f2ec Compare March 6, 2025 19:49
@aholmes aholmes force-pushed the aholmes-add-clone-color-methods branch from ea2f2ec to 438447a Compare March 6, 2025 19:51
@aholmes aholmes marked this pull request as ready for review March 6, 2025 23:23
@aholmes aholmes requested review from dan-knight and whelena March 6, 2025 23:24
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

Successfully merging this pull request may close these issues.

1 participant