Skip to content

Instantly share code, notes, and snippets.

@Mara-Li
Created February 2, 2026 06:16
Show Gist options
  • Select an option

  • Save Mara-Li/165b561edec2084b6a1e01d922c341b6 to your computer and use it in GitHub Desktop.

Select an option

Save Mara-Li/165b561edec2084b6a1e01d922c341b6 to your computer and use it in GitHub Desktop.
import random
from rich.console import Console
from rich.color import Color
console = Console()
random_color = Color.from_rgb(
random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)
)
hexRandom = random_color[0]
console.print(hexRandom, style=f"on {hexRandom}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment