Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Let brightness command handle delta changes
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
VideoFrame.java
diff --git
a/src/kaka/cakelight/VideoFrame.java
b/src/kaka/cakelight/VideoFrame.java
index
6435242
..
931237d
100644
(file)
--- a/
src/kaka/cakelight/VideoFrame.java
+++ b/
src/kaka/cakelight/VideoFrame.java
@@
-104,7
+104,10
@@
public class VideoFrame {
private Color wrappedGetLedColor(ListPosition listPosition, int xy) {
Color c = getLedColor(listPosition, xy);
double[] hsv = c.toHSV();
private Color wrappedGetLedColor(ListPosition listPosition, int xy) {
Color c = getLedColor(listPosition, xy);
double[] hsv = c.toHSV();
- return Color.hsv(hsv[0], 1, 1);
+ double saturation = config.video.saturation >= 0.5
+ ? hsv[1] + (config.video.saturation - 0.5) * 2 * (1 - hsv[1])
+ : hsv[1] - (1 - config.video.saturation * 2) * hsv[1];
+ return Color.hsv(hsv[0], saturation, hsv[2]);
}
private Color getLedColor(ListPosition listPosition, int xy) {
}
private Color getLedColor(ListPosition listPosition, int xy) {