How to set "Find" Background colour?
-
I don’t know if this is the whole story, but:
Current Line Background > background
is the background for the active line (whichever one FIND NEXT brought you to)Mark Color > foreground
is the box outline around the activeFold Margin > background
is the highlight colour for the other matches
I thought in previous versions that it was the
Smart Highlighting > background
that got used for the highlighting colour for the other matches. Did a bug get introduced?(I’ve used up my time for now, making the anim… if no one else has confirmed, I’ll check out previous version on my next break…)
Notepad++ v7.7.1 (64-bit) Build time : Jun 16 2019 - 21:24:47 Path : C:\usr\local\apps\notepad++\notepad++.exe Admin mode : OFF Local Conf mode : ON OS : Windows 10 (64-bit) Plugins : ComparePlugin.dll HexEditor.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConverter.dll NppCrypt1015.dll NppCrypt1016.dll NppExec.dll NppFTP.dll PreviewHTML.dll PythonScript.dll XMLTools.dll
-
@PeterJones said:
Mark Color > foreground
is the box outline around the active
I meant
Mark Color > background
Yes, a bug was introduced in v7.7.1. In v7.7(.0), the
Selected Text Colour > background
was what drew the box around the active one, andSmart Highlighting > background
is what coloured the other matches. That’s as I would expect.submitted issue #6100
-
Hello @Peterjones,
I’m really sorry, Peter, as I could not draw any conclusion from your tests, regarding the colour change of some styles, in the Style Configurator
First, from your animated gif picture, it happens that :
-
Some styles occur twice, as the
Find Mark Style
-
Some styles are not part of the default styles list, as the
Mark Color
style ! -
Some styles seem to be missing, as the
Fold Active
style
And, personally, I think that your image evokes different styles, at the same time which makes more difficult to understand your animation ! Don’t feel offended !
To my mind, the default list of styles for the language
Global Styles
is :•--------------------------------------------------•----------------------• | DEFAULT Styles of the "Global Styles" language | Modifiable Colours | •--------------------------------------------------•----------------------• | Global override | Back/Foreground | | Default style | Back/Foreground | | Indent guideline style | Back/Foreground | | Brace highlight style | Back/Foreground | | Bad brace colour | Back/Foreground | | Current line background colour | Background | | Selected text colour | Background | | Caret colour | Foreground | | Edge colour | Foreground | | Line number margin | Back/Foreground | | Fold | Back/Foreground | | Fold active | Foreground | | Fold margin | Back/Foreground | | White space symbol | Foreground | | Smart Highlighting | Background | | Find Mark Style | Background | | Mark Style 1 | Background | | Mark Style 2 | Background | | Mark Style 3 | Background | | Mark Style 4 | Background | | Mark Style 5 | Background | | Incremental highlighting all | Background | | Tags match highlighting | Background | | Tag attribute | Background | | Active tab focused indicator | Foreground | | Active tab unfocused indicator | Foreground | | Active tab text | Foreground | | Inactive tabs | Back/Foreground | | URL howered | Foreground | •--------------------------------------------------•----------------------•
So, Peter, may be it would be interesting to redo your tests, after renaming your
Stylers.xml
file, in all your N++ versions, in order that, on starting N++, theStylers.model.xml
file would be copied as a neatStylers.xml
file !BR
guy038
-
-
Some styles are not part of the default styles list, as the Mark Color style !
Apparently so. When I went to my fresh npp unzip (ie, exactly what came out of the zipfile), it didn’t have that extra style, and the styles behaved as expected. My bad. I’ll go close the issue.
-
Ok…so where did extra or non-standard stuff actually come from, for you? If I look at mine, I have exactly what @guy038 has enumerated.
-
@Alan-Kilborn said:
so where did extra or non-standard stuff actually come from
They magically appeared out of nowhere. They aren’t in my
stylers.xml
, and when i looked for those styles today (after having unloaded and reloaded notepad++ multiple times in the intervening day), those styles are not listed.I honestly don’t know where they came from. I am guessing they came when I was experimenting with the python for Style token not saved… I’m not sure what I did (though I had tried some pretty strange scintilla commands before you posted), but even that was almost a week ago, and I usually restart Notepad++ more often than that. So I don’t know where they came from… But they are gone now.
-
Hi, @peterjones, @alan-kilborn,
I’m rather reassured because the multiple tests I did, with, both, N++
v7.7
andv7.7.1
, did not show any anomaly ;-))Of course, a software is never perfect and can miss some associations or mis-uses ! But the good news is that, starting from a fresh official download of Notepad++, everything just go right :-))
Cheers,
guy038
P.S. :
Off topic : I’m, now, going to have a glance to that recent issue :
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5830
-
So I guess even after Peter’s diversionary tactic ;) , my question still remains of why the background color of text doesn’t seem to match the sample color presented in Style Configurator…?
-
@Alan-Kilborn said:
why the background color of text doesn’t seem to match the sample color presented in Style Configurator…?
Now that mine’s fixed, I think it match for me:
The only discrepancy is the Smart Highlighting… but highlighting often has alpha/transparency, so that makes sense. Especially since it’s different depending on whether the background is normal white, or the active line, the highlight color changes slightly.
-
So I think I remain confused…or just dumb. If I create and then “mark” a bunch of whitespace (using the
Search
>Mark...
function), and then call up the Style Configurator forFind Mark Style
, the colors simply don’t match. Nothing else coloring-wise should be going on on the lines where the whitespace is to create some sort of “blend”; they were definitely “pure white” before marking. Clearly the colors are different in the screenshots (I used a freshly unzipped portable 7.7.1), below.It begs the question, if the user wants to set up a certain color, and after doing so gets something different, what’s the point?
-
I still maintain it’s transparency. If it is, there should be a reasonably-consistent mapping from what you program for Find Mark Style > Background to what you measure, compared to the background. Since we know that something that’s 100% transparent will only show the background, and nothing of what you program; and since we know that something that’s 0% transparent will only show the programmed value and nothing of what’s in the background, we can figure out that the formula is:
transparency = (measured-programmed)/(background-programmed)
.So taking your example of red on white:
background: 255 255 255 WHITE programmed: 255 0 0 BRIGHT RED measured : 255 155 155 => 155/255=60.8% of the way from programmed to background (ie, 60% transparent)
Change the background to black, with the same programmed value, and I see (100,0,0) as the darker red highlight:
background: 0 0 0 BLACK programmed: 255 0 0 BRIGHT RED measured : 100 0 0 => 155/255=60.8% of the way from programmed to background
Change the background to charcoal:
background: 63 63 63 CHARCOAL programmed: 255 0 0 BRIGHT RED measured : 138 38 38 R CALC: (138-255=-117)/(63-255=-192) = 117/192 = 60.9% G,B CALC: (38-0=38)/(63-0) = 38/63 = 60.3%
After three experiments getting within resolution of each other as far as measured color vs programmed and background, I am going to claim that it’s 60% transparency.
if the user wants to set up a certain color, and after doing so gets something different, what’s the point?
Yeah, it would be nice to have the ability to enable/disable transparency on those “highlight” styles, like Find Mark and Smart Highlighting. Maybe you should suggest it ;-). (I already made and cancelled an issue report for this thread, so I’m not going to do another.)
-
@PeterJones said:
I still maintain it’s transparency
And that’s fine, but I maintain that the sample shown should reflect that to show a representative sample. :)
Maybe I will enter an issue.
BTW, how are you “measuring” to produce your measured values above?
-
@Alan-Kilborn said:
BTW, how are you “measuring” to produce your measured values above?
Taking a screenshot and using the
mspaint.exe
eyedropper -
@Alan-Kilborn said:
sample shown should reflect that to show a representative sample
How many different backgrounds should it show the sample against? Because there’s the default background, and the selected-line background, and … All of those will influence what the final result looks like. (Probably my vote would go for default background, but the results will still vary depending on circumstances.) I think if the box at least admitted which styles were used with transparency (even if it doesn’t let you choose how much transparency), then the user could be considered informed that the final result won’t match exactly what’s in the sample box.
-
Maybe we are just happy that if some sort of red (or blue, or whatever) is chosen…some sort of red (or…) results. :)
-
@Alan-Kilborn You are close! Indeed, you are right in that it takes the background from “selected text colour”, but the foreground is still taken depending on the respective syntax highlighting, which means I have to find a background colour for this, which is different from the current background colour, but at the same time sufficiently distinct from every foreground colour which might be defined by the syntax settings.
-
I supposed the true answer is that it is not a simple thing. Regarding foreground and background, even that is complicated because even though both appear for each type of setting, sometimes one or the other is ignored (see @guy038 's table above).
-
@guy038 said:
Off topic : I’m, now, going to have a glance to that recent issue :
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5830
How’s that going?
-
Hello, @peterjones, @alan-kilborn and All,
How are you, all ? You were probably wondering what was happening to me ? Fortunately, nothing serious. I’m just fine ! Actually, since more than a month, I was intensely studying numerous aspects of color, as well as color coding in computer science and, of course, some practical results for our beloved editor ! Be convinced that I’m quite pleased to be back in the Community and to share my searches ;-))
First, in the next post, you’ll see a ( very looooooong ! ) list of links, relative to color and vision, on-line color programs and color lists. Even if you do not plan to visit all the different sites, I strongly advice you to have a look to the first section, named General Information, in order to have an overview on color matters, used in computers, which should be useful for the rest of the discussion !
Best Regards,
guy038
-
Hi, All,
----------------------------------- General Information ---------------------------------------------------------- https://blog.asmartbear.com/color-wheels.html ( Introduction ) http://www.surendranath.org/GPA/General/ColorAS/ColorAS.html ( Additive and Subtractive coloring ) https://www.w3schools.com/colors/default.asp ( Excellent Color Tutorial ) https://www.physicsclassroom.com/class/light/Lesson-2/Color-Subtraction ( Color Subtraction process ) https://htmlcolorcodes.com/color-picker ( See section "Color Harmonies", below the Color Picker area ) https://www.december.com/html/spec/colorhslhexuse.html ( Color Schemes Definitions / Examples ) https://www.december.com/html/spec/colorshadesuse.html ( Color Schemes Definitions / Examples ) ---------------------------------- Wikipedia Documentation ------------------------------------------------------- https://en.wikipedia.org/wiki/Color_theory https://en.wikipedia.org/wiki/Color https://en.wikipedia.org/wiki/Afterimage https://en.wikipedia.org/wiki/Web_colors https://en.wikipedia.org/wiki/Tints_and_shades https://en.wikipedia.org/wiki/Shades_of_black ( or blue, brown, cyan, green, gray, magenta, orange, pink, red, violet, white, yellow ) https://en.wikipedia.org/wiki/RGB_color_model https://en.wikipedia.org/wiki/CMY_color_model https://en.wikipedia.org/wiki/RYB_color_model https://en.wikipedia.org/wiki/Color_scheme https://en.wikipedia.org/wiki/Comparison_of_color_models_in_computer_graphics https://en.wikipedia.org/wiki/HSL_and_HSV https://en.wikipedia.org/wiki/CMYK_color_model https://en.wikipedia.org/wiki/Color_difference https://en.wikipedia.org/wiki/Gamma_correction#Simple_monitor_tests https://en.wikipedia.org/wiki/Alpha_compositing ----------------------------------- Color Code Converters / Conversion Formulas ---------------------------------- https://www.rapidtables.com/convert/color/index.html ( Converter / Conversions ) https://www.rapidtables.com/convert/number/hex-to-decimal.html ( Hex - Decimal Conversion ) https://www.rapidtables.com/convert/color/hex-to-rgb.html ( Hex - RGB Conversion ) ----------------------------------- On-Line Color Pickers (0) ---------------------------------------------------- https://www.w3schools.com/colors/colors_picker.asp ( Hex, RGB, HSL input ) http://chir.ag/projects/name-that-color [ /#xxxxxx ] (1) ( Hex input ) https://www.color-blindness.com/color-name-hue (1) ( Hex, RGB, HSV input ) https://www.tydac.ch/color ( Hex, RGB, HSV, Dec input ) https://www.colorhexa.com [ /xxxxxx ] ( All formats input ) https://www.rapidtables.com/web/color/RGB_Color.html ( Hex, RGB, HSV input ) https://www.color-hex.com [ /xxxxxx ] ( Hex, RGB, HSL, HSV input ) https://htmlcolorcodes.com/color-picker (2) ( Hex, RGB input ) https://www.computerhope.com/tips/tip143.htm (3) ( Mouse gestures ) http://www.copysense.co.uk/mixem.php ( Hex, RGB input ) http://davidjohnstone.net/pages/lch-lab-colour-gradient-picker [#xxxxxx[,yyyyyy]...] (4) ( All formats input ) https://www.colorschemer.com/color-picker ( Hex, RGB, HSL input ) https://encycolorpedia.com [ /xxxxxx ] (5) ( All formats input ) https://encycolorpedia.com/paints [ ?color=xxxxxx ] https://www.colorcombos.com/combotester.html [ ?color0=xxxxxx&color1=yyyyyy&.....&show_text=[N/Y] ] ( All formats input ) ----------------------------------- Notes on Color Pickers ------------------------------------------------------- (0) - The syntaxes 'xxxxxx' and 'yyyyyy' refer to the HTML 6-Hexadecimal Digits color (1) - Displays also the Color Name (2) - Input in HSL or CMYK Color Space zones does not produce correct results ! (3) - 2 simultaneous colors-pickers (4) - Preferably, select the "show all" option for the "Color Selection Mode", in order to display controls in all Color Spaces - Possibility of several simultaneous Color Pickers - To be sure to display all step colors, in the gradient list, for all color spaces, simply choose the swatches number, according to the formula : Swatches Number = Stops Number + ( Stops Number - 1 ) * k , where k is an integer >= 0 (5) - Beware : Erroneous Gradient to Complementary if CIELCHuv or HSL Color Space choice ----------------------------------- Color Gradient Generators ---------------------------------------------------- https://www.w3schools.com/colors/colors_gradient.asp https://www.colorhexa.com/color-gradient http://davidjohnstone.net/pages/lch-lab-colour-gradient-picker http://davidjohnstone.net/pages/cubehelix-gradient-picker https://meyerweb.com/eric/tools/color-blend/#:::hex ----------------------------------- Color Contrast Calculators --------------------------------------------------- https://snook.ca/technical/colour_contrast/colour.html ( Color Contrast Check ) http://www.msfw.com/Services/ContrastRatioCalculator ( Color Contrast Ratio Calculator with samples ) ----------------------------------- Color Blind Simulators ------------------------------------------------------- https://www.color-blindness.com/coblis-color-blindness-simulator ----------------------------------- Color Scheme Generators [ and Color Pickers ] -------------------------------- https://coolors.co/app ( Click on Space key to generate a NEW 5-colors palette ) https://color.adobe.com/create/color-wheel https://www.sessions.edu/color-calculator ( From 1 to 3 simultaneous colors-pickers ) https://bahamas10.github.io/ryb ( Use option Mask in "Color Harmonies" and choose Color Space in "Interpolation" ! ) ----------------------------------- Color Palette Generators from an Image or URL -------------------------------- http://www.colr.org https://www.rapidtables.com/web/color/color-tester.html http://mkweb.bcgsc.ca/color-summarizer/?analyze https://labs.tineye.com/color/ https://color.adobe.com/create http://colormind.io/image https://www.canva.com/colors/color-palette-generator http://www.colorfavs.com https://coolors.co/app https://encycolorpedia.com ----------------------------------- NET Image Search Engines ----------------------------------------------------- https://color.adobe.com/explore https://labs.tineye.com/multicolr ( Search images on Flickr, from 1 to 5 given colors, in adjustable proportions ) http://designspiration.net/colors/xxxxxx ( Search design images with colors similar to color with HTML value xxxxxx ) https://www.tineye.com https://images.google.com ( Search [ similar ] images from text or from the uploaded image less than ~ 5.5 Mb ) https://www.shutterstock.com ( Search [ similar ] images from text or from the uploaded image less than 5 Mb ) ----------------------------------- Color Charts / Palettes ------------------------------------------------------ https://htmlcolorcodes.com/color-chart ( Color charts ) http://html-color-codes.com ( HTML Color Chart in Hex ) http://html-color-codes.com/rgb.html ( HTML Color Chart in RGB ) https://www.december.com/html/spec/colorhslhex.html ( Hue intervals of 30° ) https://www.december.com/html/spec/colorhslhex10.html ( Hue intervals of 10° ) https://www.december.com/html/spec/colorhslhex6.html ( Hue intervals of 6° ) https://www.december.com/html/spec/colorhsltable.html ( Hue intervals of 30° ) https://www.december.com/html/spec/colorhsltable10.html ( Hue intervals of 10° ) https://www.december.com/html/spec/colorhsltable6.html ( Hue intervals of 6° ) https://www.december.com/html/spec/colorspottable.html http://mkweb.bcgsc.ca/colornames/#color-name-swatches ( Hue intervals of 30° and Luminance intervals of 20 ) https://www.color-hex.com/color-palettes ( 58520 palettes listed ! ) https://www.canva.com/learn/100-color-combinations ( 100 Brilliant Palette Combinations ) http://files.culturenumerique.webnode.fr/200000039-4f4605138d/nuancier_quadri.pdf ( 1,900 colors ) ----------------------------------- Miscellaneous ---------------------------------------------------------------- http://people.csail.mit.edu/jaffer/Color/Dictionaries.html ( List of color lists ! ) https://www.pantone.com/color-intelligence/color-education/color-iq-test ( Hues Vision Tester : funny and informative ! ) https://www.canva.com/colors/color-meanings ( Color meanings ) http://mkweb.bcgsc.ca/color ( 'Colorconvert' and 'colorsnap' DOS mode software ) http://pngimg.com/download/19631 ( Google logo ) Red = EA4335 Green = 34A853 Yellow = FBBC05 Blue = 4285F4 ( ~ Cinnabar E34234 ) ( ~ Chateau Green 40A860 ) ( ~ Selective Yellow FFBA00 ) ( ~ Dodger Blue 1E90FF ) ----------------------------------- Lists of Named colors -------------------------------------------------------- https://www.color-hex.com/color-names.html 505 colors http://chir.ag/projects/ntc/ntc.js 1,566 colors https://www.colorhexa.com/color-names 746 colors https://color-ize.com/color-list.php#D 170 colors ( Extract with Source Code ) http://www.agence-casanova.fr/professionnel/identitaire/pantone.html 907 colors https://www.toutes-les-couleurs.com/nuancier-pantone.php 992 colors ( Extract with Source Code ) http://www.stardustcolors.com/documents/fr/nuancier-pantone.pdf 992 colors https://www.rapidtables.com/web/color/RGB_Color.html#color-table 155 colors http://www.resene.co.nz/swatches/download_pencils.xls 10,125 colors https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors 20 colors https://htmlcolorcodes.com/color-names 140 colors ( HTML + CSS Color Names ) https://www.computerhope.com/htmcolor.htm 342 colors http://www.workwithcolor.com/color-chart-full-01.htm 258 colors https://www.colorcombos.com/color-tags.html 1,598 Color Names https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json 148 colors ( HTML + CSS Color Names ) https://cloford.com/resources/colours/500col.htm 552 colors https://cloford.com/resources/colours/namedcol.htm 140 colors ( HTML + CSS Color Names ) https://www.w3schools.com/colors/colors_crayola.asp 318 colors https://www.w3schools.com/colors/colors_names.asp 140 colors ( HTML Color Names ) https://www.w3schools.com/colors/colors_trends.asp 126 colors http://applied-r.com/download/6568/ 657 colors ( PDF file with Colors by Name ) http://applied-r.com/download/6577/ 657 colors ( PDF file with Hex Color values ) http://people.csail.mit.edu/jaffer/Color/resenecolours.txt 1,383 colors ( 2007 ) http://people.csail.mit.edu/jaffer/Color/Resene-2010-rgb.txt 1,378 colors ( Use preferably the previous list ! ) http://people.csail.mit.edu/jaffer/Color/rgb.txt 732 colors ( X Consortium ) https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F 334 colors \ | https://en.wikipedia.org/wiki/List_of_colors:_G%E2%80%93M 235 colors > 956 colors | https://en.wikipedia.org/wiki/List_of_colors:_N%E2%80%93Z 387 colors / https://en.wikipedia.org/wiki/List_of_colors_%28compact%29 1,537 colors ( Extract with Source Code ) https://en.wikipedia.org/wiki/List_of_colors_by_shade 526 colors ( Extract with Source Code ) https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart 145 colors ( X11 Color Names ) https://en.wikipedia.org/wiki/Web_colors#X11_color_names 140 colors ( X11 Color Names ) https://en.wikipedia.org/wiki/Web_colors#Color_table 216 colors ( = 6 * 6 * 6 Web-Safe Colors ) https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors 164 colors https://www.december.com/html/spec/colorcodes.html 1,109 colors https://www.december.com/html/spec/colorucl.html \ > 932 colors ( + 42 NON-defined ) https://www.december.com/html/spec/colorucl2.html / https://encycolorpedia.com/html 148 colors ( HTML + CSS Color Names ) https://encycolorpedia.com/named 1,690 colors http://mkweb.bcgsc.ca/colornames/color.names.rgbonly.txt 9,284 colors http://mkweb.bcgsc.ca/colornames/color.names.txt 9,284 colors http://mkweb.bcgsc.ca/colornames/rgb.names.txt.gz ( 217 Mo file ! ) http://mkweb.bcgsc.ca/colornames/#color-name-swatches 7,820 colors https://xkcd.com/color/rgb 954 colors https://xkcd.com/color/rgb.txt ) 954 colors https://blog.xkcd.com/2010/05/03/color-survey-results 48 colors ( Section "RGB values" ) https://www.colorschemer.com/roblox-color-codes 208 colors https://www.colorschemer.com/color-names 139 colors ( HTML and CSS Color Names ) https://www.colorschemer.com/rgb-color-codes 139 colors ( RGB Color Names ) ----------------------------------- Additional Theoretical Information on Color ---------------------------------- http://www.handprint.com/HP/WCL/wcolor.html ( Color Theory ) http://www.handprint.com/LS/CVS/color.html ( Color Vision ) http://www.handprint.com/HP/WCL/wtech.html ( Color Techniques ) http://www.handprint.com/HP/WCL/color1.html ( Light and the Eye ) http://www.handprint.com/HP/WCL/color4.html ( Color Constancy ) http://www.handprint.com/HP/WCL/tech13.html ( Color Harmony and Design ) ------------------------------------------------------------------------------------------------------------------
guy038