I can deduce from all the javascript files in the %HOMEPATH%\QLC+\RGBscripts folder that the variable, rgb, is the FIRST, START, or only color of a user selectable color option in a matrix pattern that supports such. The docs say this is a type integer variable, thus not an array. So, what then is the variable for the SECOND or END color of such patterns? I've scoured through all of the pattern scripts that support two color selections, but cannot find any variable in those javascript files relating to the second/end color that such patterns fade to from the start color.
I need some help figuring. I thought I might try using the gradient.js file as a base to create a 'custom_gradient.js that supports two user custom color inputs (start/end) and remove all "built-in" presets (rainbow, ocean, sunset, etc.). Thanks!
New to RGB Script API
- GGGss
- Posts: 3052
- Joined: Mon Sep 12, 2016 7:15 pm
- Location: Belgium
- Real Name: Fredje Gallon
Since you are ranting in the other thread ... did you study this document? https://www.qlcplus.org/old/docs/html_e ... ptapi.html
The colours set can be fixed or set by the user in the RGBmatrix interface. Even in VC, you can add an animation that influences the outcome of the RGB script. Here, you can also choose your start and end colours. I don't have experience with the RGB script, but I think the documentation is straightforward.
In addition to everything, there is a developer testbed here: https://raw.githubusercontent.com/mcall ... vtool.html. Again, you can see the two colours that can be selected. Unfortunately, the needed javascript file has been broken, but you can get the hang of the interaction between the script and the user interface.
Good luck
The colours set can be fixed or set by the user in the RGBmatrix interface. Even in VC, you can add an animation that influences the outcome of the RGB script. Here, you can also choose your start and end colours. I don't have experience with the RGB script, but I think the documentation is straightforward.
In addition to everything, there is a developer testbed here: https://raw.githubusercontent.com/mcall ... vtool.html. Again, you can see the two colours that can be selected. Unfortunately, the needed javascript file has been broken, but you can get the hang of the interaction between the script and the user interface.
Good luck
All electric machines work on smoke... when the smoke escapes... they don't work anymore
-
- Posts: 3
- Joined: Wed Oct 16, 2024 4:37 pm
- Real Name: Dean Scott
Yes. I've THOROUGHLY read and reread and reread and reread that document. No where does it give any examples of pulling rgb value(s). It just assumes complete understanding and knowledge of the internal workings of QLC+, because all it says is "The rgb parameter is an integer-representation of the color selected by user in the RGB Matrix Editor." Keyword THE, singular. OK, but WHICH color for those patterns that expose TWO selectors? Obviously, from looking at all the *.js files in the RGBscripts folder, rgb, as I said in my OP, refers ONLY to the start/first color. Again, what about the end color? HOW do these scripts KNOW what color to FADE to? WHERE are they getting that data? The code is ambiguous. The example presented is ambiguous, nor commented. I AM NOT a javascript programmer. I can only LOOK at and read code to some extent, and "hack" it until I get it do what I want it to do.
I understand the use of properties in API 2, but that's hard coding desired colors, which the gradient.js pattern does for its built-in, hard-coded preset colors. The DESIRED OUTCOME of this exercise is to have a FAST, EASY way for users to select their own start and end color for a gradient. Simple as that. Sure, they/we can use a Chaser and X number of Scenes to accomplish the task, but that buries the user several levels deep just to change fixture colors in each scene, something not easily as doable on the fly, as can be done using the brilliant RGB Matrix Widget for those patterns that support "algo.acceptColors=2."
My apologies to GGGss for "ranting" (whatever that means) when all I did was agree and empathize with another user asking the same question 6 yrs ago, to which no one answered. How that's a "rant" is beyond my comprehension.
I understand the use of properties in API 2, but that's hard coding desired colors, which the gradient.js pattern does for its built-in, hard-coded preset colors. The DESIRED OUTCOME of this exercise is to have a FAST, EASY way for users to select their own start and end color for a gradient. Simple as that. Sure, they/we can use a Chaser and X number of Scenes to accomplish the task, but that buries the user several levels deep just to change fixture colors in each scene, something not easily as doable on the fly, as can be done using the brilliant RGB Matrix Widget for those patterns that support "algo.acceptColors=2."
My apologies to GGGss for "ranting" (whatever that means) when all I did was agree and empathize with another user asking the same question 6 yrs ago, to which no one answered. How that's a "rant" is beyond my comprehension.