Skip to content

TOMASZ "CeDeROM" CEDRO (SQ7MHZ)

  • Home
  • About
  • CeDeROM
  • Contact
  • SHOP
  • Files
computers FAQ

Python float color list to WebRGB

Dec 14, 2022 CeDeROM 0 Comment

You can easily convert  float color list (i.e. used in Kivy [1]) to Web RGB in Python [2] with oneliner:

c = [0.5019607843137255, 0.796078431372549, 0.7686274509803922, 1.0]
rgb = '#%02X%02X%02X%02X' % tuple(int(255*i) for i in c)
'#80CBC4FF'

[1] https://kivy.org/
[2] https://www.python.org/

Share this:

  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on X (Opens in new window) X
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on WhatsApp (Opens in new window) WhatsApp

Categories

  • 3D print (3)
  • aerospace (4)
  • aviation (10)
  • bugs (18)
  • CAD (2)
  • computer networks (18)
  • computers (97)
  • DIY (Do It Yourself) (25)
  • electronics (52)
  • FAQ (49)
  • hall of fame (6)
  • hall of shame (14)
  • ham radio (4)
  • hardware (45)
  • mind log (19)
  • mobile (9)
  • modifications (30)
  • moto (1)
  • Neural Interface (1)
  • neuroscience (4)
  • science (18)
  • skydive (7)
  • software (77)
  • telemedicine (2)
  • Virtual Reality (4)

Tags

3D android apple arm aviation BCI Blender bluetooth bootloader BSD bug bugs computer modification conference cpu development DIY drivers electronics embedded fail free-software freebsd google hall of shame install installer interface jtag linux macOS neuroscience open source osx problem python science skydive sony swd training usb virtual-reality windows xperia

bookmarks

  • CVGM
  • GitHub
  • Google Scholar
  • LinkedIn
  • SceneMusic
  • SoundCloud
  • SourceForge
  • Twitter
  • Vimeo
  • YouTube
© 2000-2006, 2006-2012, 2012-2021, 2021+ CeDeROM Tomasz CEDRO, All rights reserved! :-)
Powered by WordPress , Theme by ThemeArile.