[Advanced tutorial] Some calculation formulas for PS hybrid mode)

Source: Internet
Author: User
Http://blog.sina.com.cn/s/blog_5f92127b0101amz2.html [advanced tutorial] PS mixed mode of some calculation formula, mode mixed mode can combine the color values of the two layers together, thus creating a lot of effect, behind these effects are some simple mathematical formulas. The following is a mathematical formula for all the mixed modes in Photoshop CS2. Opacity is also introduced. These formulas are only applicable to RGB Images and will no longer apply to Lab color images. Opacity opacity c = da + (1-D) B is opacity relative to opacity. The relationship between these two terms is similar to the relationship between positive and negative: the opacity of 100% is the transparency of 0%. This hybrid mode is relatively simple. In this hybrid mode, if the order of the two layers is different, the results will be different (except for 50% transparency of course ). In this formula, a represents the color value (A = pixel value 255) of the above layer pixels, and D represents the transparency of the layer, B Indicates the color value of the following layer pixels (B = pixel value 255), and C indicates the color value of the Mixed Pixel (the actual result pixel value should be 255C ). This formula is also applied to the layer mask. In this case, D represents the brightness of the pixel at the given position in the mask layer. Darken darken B = A c = BB = A c = A in this mode, the upper and lower pixels are compared and the relatively dark pixels are used as the output. Note, the pixels of each different color channel are compared independently, and the color value is relatively small as the output result. The lower layer indicates the layer in which the stacked order is located, the upper layer indicates the layer where the stacked order is located. Lighten brightening B = A c = aba c = B this mode is similar to the previous mode. The difference is that the color value is greater (that is, brighter) as the output result. Multiply front slice stacked c = AB this effect will be two standard color values (based on 0 .. 1) After multiplication, the output results can be described as: two slides are superimposed and then displayed, and the transmitted light needs to be used separately through these two slides, thus being weakened twice. Screen Filter C = 1-(1-A) (1-B) can also be written as 1-C = (1-A) (1-B). This mode is the opposite of the previous mode, after the standard color values of the upper and lower layers are multiplied, the output result will be brighter than the two pixel values (as if the two projectors respectively perform projection on one layer, and then projected onto the same screen ). From the second formula, we can see that if the two layers are reversed and mixed in multiply mode, the results will be exactly the same as those after the two layers are mixed in screen mode. Color Dodge color fades c = B (1-A) In this mode, the brightness of the upper layer determines the exposure of the lower layer. If the upper layer is brighter, the more light the lower layer gets, that is, the brighter the lower layer gets. If the upper layer is pure black, that is, there is no brightness, it will not affect the lower layer. If the upper layer is pure white, the lower layer is exposed except where the pixel is 255, and all other places are white (that is, 255, not exposed ). The blackest result is not lower than the lower pixel value. Color burn color deepening c = 1-(1-B) A this mode is just the opposite of the previous mode. If the upper layer is darker, the lower layer gets less light. If the upper layer is black, the lower layer gets darker. If the upper layer is white, the lower layer will not be affected. The result is brighter than the lower pixel value. Linear Dodge linear subtraction c = a + B adds the color values of the upper and lower layers. The result is brighter. Linear burn linear deepening c = a + B-1 if the sum of pixels on the upper and lower layers is less than 255, the output will be pure black. If the upper layer is reversed, the result is purely mathematical subtraction. Overlay overlays B = 0.5 C = 2abb0. 5 c = 1-2 (1-A) (1-B) based on the lower color values, this mode may be multiply or screen mode. The upper layer determines the intensity of the lower intermediate tone offset. If the upper layer is 50% Gray, the result is completely the lower pixel value. If the upper layer is darker than 50%, the middle tones of the lower layer will be shifted to the dark place. If the upper layer is brighter than 50%, the middle tones of the lower layer will be shifted to the bright place. For the upper layer is darker than 50%, the color bands below the lower middle tones are reduced (originally 0 ~ 201740.5, now 0 ~ Medium 30.5), with the color band becoming wider than the intermediate color (originally being medium 40.5 ~ 1. It is now 255.30.5 ~ 1 ). And vice versa. Hard light a = 0.5 C = 2aba0. 5 c = 1-2 (1-A) (1-B) This mode completely matches the order of the two layers in Overlay mode. If the color above the upper layer is higher than 50% Gray, the lower layer is brighter, and vice versa. Soft light soft light a = 0.5 C = (2a-1) (B-BB) + BA0.5 c = (2a-1) (SQRT (B)-B) + B this mode is similar to the upper layer to modulated the lower layer color value in the Gamma value range of 2.0 to 0.5. The result is a very soft combination. Vivid light a = 0.5 C = 1-(1-B) 2aa0. 5 c = B (2 (1-A) This mode greatly increases the contrast, especially in bright and dark areas. It can be considered that color burn and color Dodge are used in the dark. Linear Light linear light C = B + 2a-1 compared to the previous mode, the contrast increased by this mode is weaker. Similar to linear burn, it only deepens the influence of the upper layer. PIN Light Spot Light B2A-1 c = 2a-12a-1b2a c = bb2a c = 2a the result of this mode is that the intermediate tone is almost unchanged in the lower layer, but the two sides are a combination of darken and lighte. Hard mix solid color mix A1-B c = 0a1-b c = 1 this mode causes the final result to contain only 6 basic colors, each channel is either 0 or 255. Difference difference c = absolute value of upper and lower tone of A-B. This mode is mainly used to compare two different versions of images. If both are complete
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.