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 5982283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:03:55+00:00 2026-05-22T22:03:55+00:00

One thing I’ve seen in some Desktop applications is the ability to change the

  • 0

One thing I’ve seen in some Desktop applications is the ability to change the color of text as the background changes — to effectively have multiple colors on a single character. I’ve seen this most commonly with progress bars that display the percentage inside the bar. Generally a darker background color will be used as the progress bar color, and as it progresses, the dark color doesn’t contrast enough with the dark text, so the text color changes as soon as the bar overlaps with the text. This image should explain what I mean:

Progress Bars

As you can see, the text is black when it’s at 0% — when there is no dark background. When the background image fully progresses to 100%, the text is completely white. But in the middle, as you can see at 50%, the text is half black/half white, and it’s actually split on the “0” character in this example.

Is there any way to do this at all on a webpage? CSS, Images, Jquery, otherwise? (Preferably not Flash or a Java applet though — I’m really wondering whether an HTML-based solution is possible.) Thanks!

  • 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-22T22:03:56+00:00Added an answer on May 22, 2026 at 10:03 pm

    I’ll get you started:

    1. Create two equally sized “progress bars” (divs). Set their size to the full width they would be if they were at 100%.
    2. Set one bar to black text with a white background and the other to yellow text with a blue background, as per your example above.
    3. Set the yellow/blue bar in a parent div and increase the width of the parent on every percentage increase. Position the parent above the black/white bar.
    4. Also on every increase, update the labels of both progress bars to represent the percentage.

    That will simulate the same effect without having to manually paint half a character. It will be difficult in CSS because you will have to position one over the other.

    The benefit of doing it this way is that you can easily display half-painted characters. There is already a jQuery progress bar you can use, though.

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

Sidebar

Related Questions

One thing I don't like about writing javascript-based applications is that you have to
One thing I've started doing more often recently is retrieving some data at the
I have a script that appends some rows to a table. One of the
One thing I really miss on my windows phone 7 is the ability to
One thing that's always confused me is how a BackgroundWorker seems to have thread-safe
One thing I love about Python and PHP is the ability to make a
I can't understand one thing. Suppose I already have these coded entities: [Table(Name =
I recently started using WPF and the MVVM framework, one thing that I have
One thing I've always wanted to do is develop my very own operating system
One thing I really miss about Java is the tool support. FindBugs, Checkstyle and

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.