Рубрики

purple

Tints that match light purple


Given an RGB value, how do I create a tint (or shade)?

Given an RGB value, like 168, 0, 255 , how do I create tints (make it lighter) and shades (make it darker) of the color?

Follow
8,420 15 15 gold badges 50 50 silver badges 83 83 bronze badges
asked Jul 7, 2011 at 17:57
DenaliHardtail DenaliHardtail
27.5k 56 56 gold badges 155 155 silver badges 234 234 bronze badges

3 Answers 3

Sorted by: Reset to default

Among several options for shading and tinting:

  • For shades, multiply each component by 1/4, 1/2, 3/4, etc., of its previous value. The smaller the factor, the darker the shade.
  • For tints, calculate (255 – previous value), multiply that by 1/4, 1/2, 3/4, etc. (the greater the factor, the lighter the tint), and add that to the previous value (assuming each.component is a 8-bit integer).

Note that color manipulations (such as tints and other shading) should be done in linear RGB. However, RGB colors specified in documents or encoded in images and video are not likely to be in linear RGB, in which case a so-called inverse transfer function needs to be applied to each of the RGB color’s components. This function varies with the RGB color space. For example, in the sRGB color space (which can be assumed if the RGB color space is unknown), this function is roughly equivalent to raising each sRGB color component (ranging from 0 through 1) to a power of 2.2. (Note that “linear RGB” is not an RGB color space.)

See also Violet Giraffe’s comment about “gamma correction”.

Follow
answered Jul 7, 2011 at 18:01
Peter O. Peter O.
32.3k 14 14 gold badges 83 83 silver badges 96 96 bronze badges

I tried this out and it worked great. I thought it would be helpful to write examples of the formulas. Original (r,g,b); Shade (rs,gs,bs): rs = r * 0.25 , gs = g * 0.25 , bs = b * 0.25 (that is a pretty dark shade); Tint (rt,gt,bt): rt = r + (0.25 * (255 – r)) , gt = g + (0.25 * (255 – g)) , bt = b + (0.25 * (255 – b)) (that is a pretty light tint). I did it as part of a cool array that created lots of hues and it worked great. Hope that helps. Thanks Peter.

Feb 19, 2014 at 0:41
You have made a mistake. It is viceversa.
Dec 24, 2014 at 7:22
Are you sure these manipulation must not account for gamma correction?
Jun 6, 2016 at 11:06

@VioletGiraffe: You make a good point with gamma correction. See my edit. (This replaces a deleted comment of mine from 22 hours ago.)

Jan 26, 2017 at 21:17

Some definitions

  • A shade is produced by “darkening” a hue or “adding black”
  • A tint is produced by “ligthening” a hue or “adding white”

Depending on your Color Model, there are different methods to create a darker (shaded) or lighter (tinted) color:

newR = currentR * (1 - shade_factor) newG = currentG * (1 - shade_factor) newB = currentB * (1 - shade_factor) 
newR = currentR + (255 - currentR) * tint_factor newG = currentG + (255 - currentG) * tint_factor newB = currentB + (255 - currentB) * tint_factor 
newR = currentR + (aR - currentR) * alpha newG = currentG + (aG - currentG) * alpha newB = currentB + (aB - currentB) * alpha 

where (aR,aG,aB) = black = (0,0,0) for shading, and (aR,aG,aB) = white = (255,255,255) for tinting

  • To shade: lower the Value / Brightness or increase the Saturation
  • To tint: lower the Saturation or increase the Value / Brightness
  • To shade: lower the Lightness
  • To tint: increase the Lightness

There exists formulas to convert from one color model to another. As per your initial question, if you are in RGB and want to use the HSV model to shade for example, you can just convert to HSV , do the shading and convert back to RGB . Formula to convert are not trivial but can be found on the internet. Depending on your language, it might also be available as a core function :

  • RGB to HSV color in javascript?
  • Convert RGB value to HSV


VVIVID VINYL PURPLE HEADLIGHT TINT | V311

These tint films are the first of their kind and are designed to conform to any difficult surface that would otherwise be impossible with standard headlight tints.

Specification:

  • Features: VVIVID Scratch Resistance, Protective Liner
  • Type: Automotive, Architectural, Marketing Applications, Indoor & Outdoor
  • Lifetime: 3-5 years (Based On Vertical Exposure)
  • Finish: Clear Transparent Gloss
  • Adhesive Type: Acrylic-Based
  • Thickness: 2.5 mils
  • Roll Width: 5 feet (60 inches)
  • Conformability: High
  • Application Method: Dry or Wet

If you have any questions, or if you need assistance, please do not hesitate to contact our customer service department:

Customer Reviews

Be the first to write a review

Recently Viewed

Best Sellers

Quick View

AVERY DENNISON SW900 SUPREME GLOSS BLACK VINYL WRAP | SW900-190-O

Price $1.99 CAD — $932.39 CAD

Quick View

3M 1080 / 2080 SCOTCHPRINT GLOSS BLACK VINYL WRAP | G12

Price $1.99 CAD — $1,078.93 CAD

Quick View

AVERY DENNISON SW900 SUPREME SATIN BLACK VINYL WRAP | SW900-197-O

Price $1.99 CAD — $932.39 CAD
Sold out

Quick View

VVIVID VINYL 2020 VVIVID+ LIGHT SMOKE AIR-TINT HEADLIGHT TINT | V319

Price $1.99 CAD — $1,144.46 CAD

Quick View

3M COLOR STABLE SERIES AUTOMOTIVE WINDOW TINT FILM

Price $2.99 CAD — $941.70 CAD

Quick View

3M SCOTCHGARD PRO SERIES 4.0 CLEAR / GLOSS PAINT PROTECTION FILM – NEARLY INVISIBLE PPF

Price $2.99 CAD — $1,676.31 CAD

Quick View

3M 1080 / 2080 SCOTCHPRINT SATIN BLACK VINYL WRAP | S12

Price $1.99 CAD — $1,078.93 CAD

Our Best Sellers

Shop All

Let customers speak for us

from 2022 reviews
Perfect
Exactly what I needed
Rsquad911
10/28/2023
AVERY DENNISON SW900 SUPREME GLOSS AMBULANCE YELLOW VINYL WRAP | SW900-236-O
3m primer
Works as it should, great delivery times. All products came in great condition
FF Customs
10/26/2023
3M PRIMER 94 1/2 PINT 8OZ – INCREASES / PROMOTES ADHESION!
Amazing Colour & Quality, Look at real world applications to Gauge colour

Avery Dennison seems to make exceptional material. This film is conformable & forgiving. Please look at real images & videos to gauge the colour. I find it looks nothing like what the website shows. Funny enough I was not considering it till I looked at some videos & other images. If you are looking for a dark satin grey this is my top pick currently. It provides amazing contrast in the sun light. It will highlight body lines in a warm metallic grey/dark silver, anything in the shade or out of direct sun will be a deep charcoal grey. Over all I am every impressed. I was able to lay out & squeegee this material with very minimal use of heat. I typically only needed the heat gun to heal any wrinkles I caused & for post heating. This makes the application very easy efficient. I would highly suggest this if you or a customer is looking for a dark satin grey. This was my first time wrapping a vehicle, only previous experience was using vivvid gloss black to do my roof. Avery Dennison is a FAR better film. I though Vivvid was good due to my lack of experience. Once I completed my first body panel with Avery, I was shocked by the difference.

Colin Wynn
the authorColin Wynn

Leave a Reply