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

new: mixRGB() for additive color mixing #62

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Conversation

jiajic
Copy link
Member

@jiajic jiajic commented Feb 2, 2024

No description provided.

@jiajic jiajic merged commit 92d230b into drieslab:dev Feb 2, 2024
1 check passed
#' @title Colormixing in RGB space
#' @description
#' Vectorized additive mixing of colors in RGB space.
#' @param c1,c2 Colors 1 and 2. Accepts vector of hex color codes or an rgb matrix

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. This line is 82 characters. Note

Lines should not be more than 80 characters. This line is 82 characters.
#' par(bg = "black")
#'
#' # plot input color vectors
#' plot(seq(255), y = rep(2, 255), col = a, pch = 15, ylim = c(0, 3), bg = "black")

Check notice

Code scanning / lintr

Lines should not be more than 80 characters. This line is 83 characters. Note

Lines should not be more than 80 characters. This line is 83 characters.

#' @rdname mixRGB
#' @export
mixRGB <- function(c1, c2, output = c("hex", "rgb")) {

Check notice

Code scanning / lintr

Variable and function name style should match snake_case or symbols. Note

Variable and function name style should match snake_case or symbols.

grDevices::rgb(t(rgbm_adj))
}

Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.
grDevices::rgb(t(rgbm_adj))
}


Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.
}



Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.




Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.




Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.




Check notice

Code scanning / lintr

Trailing blank lines are superfluous. Note

Trailing blank lines are superfluous.
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