This post is in response to inquiries I've seen in various threads in regards to the displayed background row colors in NG Playlist. It is intended for those using the default Columns UI.
In Prefererences > Display > Columns UI > Playlist View > Globals tab > Style tab, you will see this script:
$if(%_themed%,,$if($and(%isplaying%,$not(%_is_group%)),
$puts(back,$offset_colour(%_back%,$offset_colour($calculate_blend_target(%_back%),ff0000,20),25))
$puts(back-selected,$offset_colour(%_selected_back%,$offset_colour($calculate_blend_target(%_selected_back%),ff0000,20),25))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$offset_colour($calculate_blend_target(%_selected_back_no_focus%),ff0000,20),25))
,
$ifequal($mod($if2(%_display_index%,%list_index%),2),0,
$puts(back,$offset_colour(%_back%,$calculate_blend_target(%_back%),25))
$puts(back-selected,%_selected_back%)
$puts(back-selected-no-focus,%_selected_back_no_focus%)
,
$puts(back-selected,$offset_colour(%_selected_back%,$calculate_blend_target(%_selected_back%),7))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$calculate_blend_target(%_selected_back_no_focus%),7))
$puts(back,%_back%)
)
)
$set_style(back,$get(back),$get(back-selected),$get(back-selected-no-focus)))
which I will try to explain the relevant parts in terms of the most often asked questions I've noticed. The script only effects the background color of the rows. It only has an effect on the color if you have System or Custom selected as the Mode under Preferences > Display > Columns UI > Colours and Fonts > Colours tab. It obviously uses the colors you have set under Colours and Fonts. Also note that other scripts added in various places might override this script.
Before I begin, allow me to say that I've only been able to find vague references to how $offset_colour() and $calculate_blend_target() affect the color, so I won't try to explain them. I will elaborate a little more on the effect they have in a moment. (If anyone can add anything meaningful about them, feel free to do so because I'd like to know, lol).
And here's a quick color reference to bear in mind in my explanations:
The red values are a color in hex, think of the green values as saturation and think of the purple values as lightness/brightness/intensity (depending upon your perception of the context. I will just reference it as intensity for simplicity's sake). Saturation and intensity values use a range of 0 to 255.
This part affects the background row color of a playing track/item:
$puts(back,$offset_colour(%_back%,$offset_colour($calculate_blend_target(%_back%),ff0000,20),25))
$puts(back-selected,$offset_colour(%_selected_back%,$offset_colour($calculate_blend_target(%_selected_back%),ff0000,20),25))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$offset_colour($calculate_blend_target(%_selected_back_no_focus%),ff0000,20),25))
,
It's rather self-explanatory under what condition how each line affects the background, bearing in mind that they only apply during playback..
The default color stipulated here (ff0000) is red, yet you will notice that the color returned is blue. This is due to the aforementioned $offset_colour() and/or $calculate_blend_target() to the best of my knowledge. If you decide to change the color and it doesn't return the color you stipulate, generally speaking you can change the value to the color that is returned to obtain the color that you do want, e.g. if you want red returned, change the value to 0000ff (blue). You may have to play around a bit with it to get what you want. Some colors do return true, however.
If you want the background of the playing track to be more noticeable, increasing the "saturation" value if your color scheme is dark or increasing the "intensity" value if your color scheme is light, generally speaking, will achieve this. You might, however, find that you will want or need to adjust both of the values.
As a quick side note, those of you who do not want to change the background color in any way, but would like the text color of the entire row to be different for the playing track, you can add a line such as the following into the part of the script quoted above. Just insert it between the last text line and the comma (the colors stipulated will return true):
$set_style(text,ff0000,ff0000,ff0000)
On to the next part. The (seemingly often disliked, lol) alternate row color:
$ifequal($mod($if2(%_display_index%,%list_index%),2),0,
$puts(back,$offset_colour(%_back%,$calculate_blend_target(%_back%),25))
$puts(back-selected,%_selected_back%)
$puts(back-selected-no-focus,%_selected_back_no_focus%)
,
Again, it's rather self-explanatory under what condition how each line affects the background. The magic here is the first line, as it specifies to display the background color in all even-numbered rows differently, but you'll notice in the lines that follow the first that it is only when a row or rows are not selected that this script modifies the background differently to what is stipulated under Colours and Fonts. There are no color settings here as those you have set under Colours and Fonts are used.
Those of you who do not want the alternate row color or want it to be more subtle will need to lower this "intensity" value if your color scheme is dark or raise it if your color scheme is light (and will obviously need to do the opposite if you want the alternate row color to be more pronounced).
This next part sets how the background row color of the odd-numbered rows is affected.
$puts(back-selected,$offset_colour(%_selected_back%,$calculate_blend_target(%_selected_back%),7))
$puts(back-selected-no-focus,$offset_colour(%_selected_back_no_focus%,$calculate_blend_target(%_selected_back_no_focus%),7))
$puts(back,%_back%)
)
As you can see, this affects how the background color is shown only for selected tracks. The background for unselected tracks is shown as stipulated under Colours and Fonts.
The default values of 7 seem to work well for most people so I suggest not modifying them; however, if you decide to change them, the "intensity" values here work opposite to how they work for even-numbered rows. That is, if you have a dark color scheme, you'll want to raise the value for the selection color to be more subtle and, if your color scheme is light, you'll want to lower the value to make the selection color more subtle. Pay attention while adjusting these values as you might make your the text in these rows difficult if not impossible to read. It bears repeating: I suggest not modifying them.
As a final comment, you'll notice that the "intensity" values are mostly consistent throughout the default script. Keep that in mind.
Hopefully this post will help someone.