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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:15:35+00:00 2026-05-26T05:15:35+00:00

I’m trying to replicate the gmail label functionality for the system I’m working on.

  • 0

I’m trying to replicate the gmail label functionality for the system I’m working on. I’m using the jQLable plugin to ‘show’ the labels but the feature that we are trying to implement is this:

When the user hovers over the ‘color box’ of the label a down-arrow/triangle shows up that contrasts with the background of that color box quite well. Question is how do you do it?

Are there any jquery plugins to help you do that or can it be done by pure CSS?

I looked at the source of the gmail page and it seems that the triangle is a unicode character that shows up like this:

<div class="p8" style="">▼</div>

Just copy pasting the triangle didn’t seem to even render it on the browser 🙂 – I even entered the unicode character code for it, but no luck either.

I then created a triangle-div and absolutely positioned it where I wanted but I created an extra div just for that, but the above code seems to have the triangle as a text! It’s had me stumped!

So what I’m looking for is:

  1. Is there a way to get the triangle to show up without creating an extra div and playing with it’s style, like the above code snippet of gmail’s page? i.e., is there a special character code that I’m missing?
  2. How do I get the ‘color’ of the triangle to contrast with the background? Is there a jquery plugin (I’m guessing pure CSS wouldn’t work here, correct?) e.g. if the user selects a black label color, the triangle is better displayed as a lighter color – the triangle wouldn’t be visible if it was preset to black.

Googling around for something like this turned out weird results. Seems I need human responses 😀

UPDATE: #1 above is resolved and works fine. It was an issue with using multiple editors. However #2 of being able to ‘contrast’ the arrow with the background still remains ‘unsolved‘ 🙁

  • 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-26T05:15:35+00:00Added an answer on May 26, 2026 at 5:15 am

    It’s taken quite a while but the 2nd part still remained unanswered. However, here is a potential solution that I stumbled on. The solution is similar to the ‘complement’ color wheel on http://www.colorschemedesigner.com

    Basic algorithm:

    1. Convert RGB to HSV
    2. Calculate complement in HSV color space (there are common algos to do this it seems)
    3. Convert value back to RGB

    That’ll ensure the complement is always contrasting to the background.

    I’m not sure if any solution exists, but I guess I’ll go with this one and mark it as an answer for now. If you play with the color wheel on the above link it seems to solve my problem…you may want to give it a try it for yourself 🙂

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to loop through a bunch of documents I have to put

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.