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

  • Home
  • SEARCH
  • 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'm overthinking this. I have colors stored in a database table, and I want
Possible Duplicate: Avoiding repeated constants in CSS We have some theme colors that are
As part of a VBA program, I have to set the background colors of
Let's say that we have an ARGB color: Color argb = Color.FromARGB(127, 69, 12,
I have a device that supports 4-color graphics (much like CGA in the old
I have an element in my document that has a background color and image
I have a widget that displays a set of information. What I would like
I have created a ShapeDrawable and placed it within an imageview that is dynamically
I have a JQuery progress bar I want to theme (documentation here ) dynamically:
i have an algorithm that reduces the number of colors in a picture. I

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.