Hacker News new | ask | show | jobs
by dark-star 1478 days ago
So which of these actually spell the color they represent (or something closely related)? From a quick glance, I have no found any. Do color-words like that exist in other languages maybe?
19 comments

#1C1E57 (ICIEST) is dark blue, which could hold true in certain contexts!

#DEBA65 (DEBAGS) is brown, much like de color of de bags made of de paper.

And on a related and exceptionally juvenile note, it should be very possible - and frankly obligatory, for those in fashion tech companies reading this - to create and sell a #B00B1E colored bra.

Tangentially related, and equally juvenile, I own the telephone number in Australia: 08 80087355

Still gives me a chuckle. Grow up.

I just called, why didn't you pick up?
Voicemail not enabled and no SIP client logger in.

Should have connected for a few giggles this arvo.

RIP your voicemail
It's 2022: RIP the concept of voicemail
You think the concept of people leaving audio messages to one another is dead? That seems like something that will never die out.
The concept of people leaving audio messages _with a reasonable expectation that someone will listen to them_ is (thankfully) dying out, at least among my social circles.

You can leave a message if you want, I'm not going to listen to it. The only entities that make unexpected phone calls are scammers and bots.

in my circle its common to email mp3 attachments
OB(viously) BOOBLESS?
(EXTREMELY minor spoilers for Everything Everywhere All At Once) .

.

.

.

.

.

.

My inner child chuckled to see 55378008 displayed on a calculator near the end of that movie.

#D0661E - a nice brown doggie.

#CA771E - brown cattle.

#C10ACA - a purple cloaca.

#C017A1 - coital, similarly purplish pink.

Lots of blues and greens starting with #5EA... (Sea...). #5EABED (Seabed), #5EABEE (Seabee), #5EAD06 (Seadog) and #5EA by itself.

(I used https://hex-colours.netlify.app/, which looks like it was the original from another comment, and allows you to search pieces of words.)

#C0A575 (coasts) is a sandy-brown beach color.

#6E0DE5 (geodes) definitely has that deep purple color you think of.

And my favorite, #5A6E57 (sagest) is about as close to the color sage as you can get.

#B00B00 (dark red) was my favorite
Great color for errors!
Good question. I thought of an algorithm to find the hex word colors that most closely match the color they represent...

Basically: get the color of the _word_ by doing an image search and extracting the dominant color from the first image result. Then compare that color to the hex color (in CIELAB color space) to get the color difference. Track the hex words with lowest difference.

Here's a rough impl in Python:

  import sys
  import os
  import heapq
  
  import requests
  from google.cloud import vision
  
  from colormath.color_objects import sRGBColor, LabColor
  from colormath.color_conversions import convert_color
  from colormath.color_diff import delta_e_cie2000
  
  from bs4 import BeautifulSoup
  
  def download_image_for_query(query):
      search_key = os.getenv("GOOGLE_CUSTOM_SEARCH_ENGINE_KEY")
      search_engine_id = os.getenv("GOOGLE_CUSTOM_SEARCH_ENGINE_ID")
      resp = requests.get(
          f"https://www.googleapis.com/customsearch/v1?key={search_key}&cx={search_engine_id}&q={query}&searchType=image"
      )
      img_url = resp.json()["items"][0]["link"]
      img_content = requests.get(img_url).content
      return img_content
  
  def dominant_rgb_colors(image_content, num_colors=1):
      vision_client = vision.ImageAnnotatorClient()
      image = vision.Image(content=image_content)
      response = vision_client.annotate_image({"image": image})
      return [
          (int(c.color.red), int(c.color.green), int(c.color.blue))
          for c in response.image_properties_annotation.dominant_colors.colors
      ][:num_colors]
  
  # class to store hex word and calculate the difference from "true" image, based on image search
  class HeapibleHexWord:
      def generate_rgb_version(self):
          return tuple(int(self.hex_version.lstrip("#")[i:i+2], 16) for i in (0, 2, 4))
          
      def __init__(self, hex_version, english_version):
          self.hex_version = hex_version
          self.english_version = english_version
          self.rgb_version = self.generate_rgb_version()
          self.delta_from_true = float("inf")
          
      def calculate_delta_from_true(self):
          true_rgb = sRGBColor(*self.rgb_version)
          query = self.english_version
          img_content = download_image_for_query(query)
          test_rgb = sRGBColor(*dominant_rgb_colors(img_content)[0])
         
          # via http://hanzratech.in/2015/01/16/color-difference-between-2-colors-using-python.html
          delta = delta_e_cie2000(
              convert_color(true_rgb, LabColor),
              convert_color(test_rgb, LabColor)
          )
          self.delta_from_true = delta
          
      def __lt__(self, other):
          return self.delta_from_true < other.delta_from_true
  
  # scrape words from hexwords site
  hexwords_url = 'https://hexwords.netlify.app/'
  
  hexwords_page = requests.get(hexwords_url)
  soup = BeautifulSoup(hexwords_page.text, 'html.parser')
  
  buttons = soup.find_all('button', class_='svelte-1m9ptdb')
  
  hex_words = []
  for button in buttons:
      if button.text == '':
          continue
      hex_version, _, english_version = button.text.split("\n")
      hex_words.append((hex_version, english_version.replace("(", "").replace(")", "")))
  
  # iterate over the hex words, calculating the color diff between the word's hex
  # color and the "true" color based on image search
  
  hex_words_heap = []
  heapq.heapify(hex_words_heap)
  
  NUM_WORDS = 10 # looks like throttled at some point
  
  for i, hex_word in enumerate(hex_words[:NUM_WORDS]):
      print(f"working on {i}: {hex_word}")
      heapible_hex_word = HeapibleHexWord(*hex_word)
      heapible_hex_word.calculate_delta_from_true()
      heapq.heappush(hex_words_heap, heapible_hex_word)
  
  # popping from the min heap yields hexwords with smallers difference from true color
  heapq.heappop(hex_words_heap).english_version
I sometimes wish HN had the equivalent of Reddit Gold. Well done.
Alas, I'm gonna bet a lot of images are an object in the center and plenty of white or other background around it.
awesome! Agree with previous comment, this is cool
A couple more I spotted:

#ACAC1A is a shade of green and Acacia is a type of tree.

#57061E (stogie) is dark brown, and a stogie is a cigar.

#CABB1E is kind of like a taxicab yellow
#A55E55 (asses) is brown. Oh... wait.
There is a large population of brown asses in the world.
The issues isn't the color of the asses, but rather that the word spelled is assess. As in, the tax assessor is coming to assess our property now that we put on that addition. I expect our assessment to go up.
just make sure you're wearing brown pants when you read the bill
#AC1D1C is red, just like its PH test- that was the most satisfying one to me at first glance.
maybe #5EABED, which is a shade of blue?
Kind of a stretch, but #B05535 (bosses) and #BE57ED (bested) are both sort of purplish colors that looter games like Borderlands sometimes use for "pretty rare, but not unique" items (which would typically be dropped by a boss monsters when you defeat them).
How many colors do you typically identify or would be willing to accept? Somewhere between 10 and 25 would be sufficient… not every word will have a color association, but many will have more than one.

I think you need to be pretty strict to not find a match after 50 words.

#ACCE55 is green and #F1A5C0 is pinkish red, great colors for a login prompt
And then #1060FF for logoff.
5EABED (a blue) and B00B00 (blood red) were the best matches I found
Similar things in a number's value v/s its number of characters I think is called True Number, & only 4 is a true number like 4 value & FOUR has exact 4 letters.
My children definitely have clothes in colors close to #BAB1E5. #B00B00 kind of looks like blood.
A bit of a stretch, but I remarked upon #ACE71C (acetic), which is an oily, vinegary green
SEABED - blue CASSIS - purplish pink berry color
#C0C0A5 (COCOAS) Is brown