Skip to content

Commit

Permalink
update text color to changing bg colour to ofxGui as well (#6440)
Browse files Browse the repository at this point in the history
#changelog #addons
  • Loading branch information
sourya-sen authored and arturoc committed Nov 12, 2019
1 parent 54ce0e2 commit 6a3c359
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/ofxGui/src/ofxSliderGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ void ofxColorSlider_<ColorType>::changeValue(ofColor_<ColorType> & value){
}
if(isMinimized()){
setHeaderBackgroundColor(value);
float b = value.getBrightness() / value.limit();
setTextColor(b > 0.75 ? ofFloatColor(0.0) : ofFloatColor(1.0));
}
}

Expand Down

0 comments on commit 6a3c359

Please sign in to comment.