| The Following User Says Thank You to Schturman For This Useful Post: | ||
|
|
2017-07-04
, 12:44
|
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#2
|
| The Following 2 Users Say Thank You to coderus For This Useful Post: | ||
|
|
2017-07-04
, 14:34
|
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#3
|
| The Following User Says Thank You to Schturman For This Useful Post: | ||
|
|
2017-07-04
, 15:10
|
|
Posts: 62 |
Thanked: 319 times |
Joined on Jan 2013
@ Grenoble, France
|
#4
|
| The Following User Says Thank You to dcaliste For This Useful Post: | ||
|
|
2017-07-04
, 15:30
|
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#5
|
Have you tried to play with the lightness value ? I guess a value of 0. should make all the range black, while a value of 1. will make the range white.
The saturation will make the colour be less coloured… I mean with a value of 0 and a lightness at 0.5, all the range will be grey.
(I did try but I guess so)
| The Following User Says Thank You to Schturman For This Useful Post: | ||
|
|
2017-07-04
, 16:57
|
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#6
|
| The Following User Says Thank You to coderus For This Useful Post: | ||
|
|
2017-07-04
, 17:45
|
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#7
|
| The Following User Says Thank You to Schturman For This Useful Post: | ||
I use this slider (thanks to Ancelad) to get color code (see image below) and for visual effects in the setting. And I want to change this color gamma to darker colors. This code I use, maybe someone can help me and edit this code (if it possible at all) ?
Thanks
Slider { id: slider Rectangle { id: background x: slider.leftMargin z: -1 width: slider._grooveWidth height: Theme.paddingMedium anchors.top: parent.verticalCenter anchors.topMargin: -Theme.paddingLarge*2 ShaderEffect { id: rainbow property variant src: background property real saturation: 1.0 property real lightness: 0.5 property real alpha: 1.0 width: parent.width height: parent.height // Fragment shader to create hue color wheel background fragmentShader: " varying highp vec2 coord; varying highp vec2 qt_TexCoord0; uniform sampler2D src; uniform lowp float qt_Opacity; uniform lowp float saturation; uniform lowp float lightness; uniform lowp float alpha; void main() { float r, g, b; float h = qt_TexCoord0.x * 360.0; float s = saturation; float l = lightness; float c = (1.0 - abs(2.0 * l - 1.0)) * s; float hh = h / 60.0; float x = c * (1.0 - abs(mod(hh, 2.0) - 1.0)); int i = int( hh ); if (i == 0) { r = c; g = x; b = 0.0; } else if (i == 1) { r = x; g = c; b = 0.0; } else if (i == 2) { r = 0.0; g = c; b = x; } else if (i == 3) { r = 0.0; g = x; b = c; } else if (i == 4) { r = x; g = 0.0; b = c; } else if (i == 5) { r = c; g = 0.0; b = x; } else { r = 0.0; g = 0.0; b = 0.0; } float m = l - 0.5 * c; lowp vec4 tex = texture2D(src, qt_TexCoord0); gl_FragColor = vec4(r+m,g+m,b+m,alpha) * qt_Opacity; }" } } width: parent.width minimumValue: 0 maximumValue: 100 stepSize: 1 value: customFASTdialicon.framecolor valueText: "◭" onValueChanged: customFASTdialicon.framecolor = value onPressAndHold: cancel() Label { width: parent.width wrapMode: Text.Wrap font.pixelSize: Theme.fontSizeSmall horizontalAlignment: Text.AlignHCenter anchors.top: parent.verticalCenter anchors.topMargin: Theme.paddingMedium*2.8 //color: Color.toHighlight(Color.fromHsva(customFASTdialicon.framecolor/100, 1.0, 0.5, 1.0)) text: qsTr("Choose frame color") } }Lausanne & Lyon de descente...
----------------
Schturman's home page
Schturman's repo on openrepos
RPM packaging directly on your Jolla phone.
Root & User SSH access to Jolla via WinSCP.
Root and User SSH access to Jolla via Nautilus on Linux PC.