Skip to content

Commit

Permalink
Expose the stream_color_gradient_factor as a configuration parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Shresht7 committed Oct 22, 2024
1 parent a5daf01 commit 66bf2cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub struct Config {
#[clap(long, default_value = "0,255,70")]
pub stream_color: colors::RGBColor,

/// The multiplier that describes the extent of the gradient in the stream color
#[clap(long, default_value_t = 0.33)]
pub stream_color_gradient_factor: f32,

/// Color of the leading entity in a stream
#[clap(long, default_value = "200,255,200")]
pub leading_entity_color: colors::RGBColor,
Expand Down
2 changes: 1 addition & 1 deletion src/matrix/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Stream {
// Create the color gradient for the stream
let gradient = colors::LinearGradient::new(
colors::RGBColor::from(config.stream_color),
colors::RGBColor::from(config.stream_color) * 0.33, // Overloaded Operator for Scalar Multiplication
colors::RGBColor::from(config.stream_color) * config.stream_color_gradient_factor, // Overloaded Operator for Scalar Multiplication
);

// Create the following entities
Expand Down

0 comments on commit 66bf2cc

Please sign in to comment.