Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4574162
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:53:07+00:00 2026-05-21T19:53:07+00:00

I have 2 colors: 1 dynamically set and another that’s always white 0.5 alpha.

  • 0

I have 2 colors: 1 dynamically set and another that’s always white 0.5 alpha. I want to calculate the resulting white color as if it was drawn on top of the dynamic color using Overlay blend mode.

I’m aware that Overlay combines Multiply and Screen blend modes.

Multiply blend mode’s formula is:

Result Color = (Top Color) * (Bottom Color) /255

While Screen blend mode’s is:

Result Color = 255 - [((255 - Top Color)*(255 - Bottom Color))/255]

How do I calculate the resulting color for the Overlay blend mode?

Is there a UIColor extension class out there that does this out of the box?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:53:08+00:00Added an answer on May 21, 2026 at 7:53 pm

    There are two part of formula:

    First part: If Lower Layer Value > 127.5, then do the following –

    Value Unit = (255-Lower Layer Value)/127.5

    Min Value = Lower Layer Value – (255-Lower Layer Value)

    Overlay = (Upper Layer Value * Value Unit) + Min Value

    Second part: If Lower Layer Value < 127.5, then do the following –

    Value Unit=Lower Layer Value/127.5

    Overlay = Upper Layer Value * Value Unit

    From the formual we can see that the final result is much depend on the upper layer value. If the upper layer value is higher(lighter), then the final result is more likely to be lighter.

    From here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 colors #DCE7FA and #CADBF7. Want the intermediate color(a kind of Arithmetic
I have two XAML Colors as follows. <Color x:Key=DefaultColor>SteelBlue</Color> <Color x:Key=LightDefaultColor>LightSteelBlue</Color> I want to
I want to set the background color of JButton. For that I use setBackground()
I have a gradient that changes its colors, I want the text inside it
I have some colors that seem to come from a Delphi TColor variable (e.g
enum color = {blue, black=3, yellow=3}; 2 colors have the value 3, is it
I have some preset colors that I'd like to add which goes along with
I have a TabLayout. In that I have a tablelayout with dynamically added rows.
I have a rectangle that I dynamically draw in a Window. Said Window has
The Scenario I have a table on a web page that is dynamically generated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.