Documentation
Our WebsiteOur Github
  • 👋Welcome to Infinitode Documentation
  • AI Documentation
  • API Documentation
    • Basic Math API Documentation (#Experimental)
    • BMI Calculator API Documentation
    • Character Counter API Documentation
    • Chemical Equation Balancer API Documentation
    • Color Generator API Documentation
    • Date Difference Calculator API Documentation
    • Dungen API Documentation
    • Dungen Dev API Documentation
    • Factorial Calculator API Documentation
    • Fantasy Name Generator API Documentation
    • Fibonacci Sequence Generator API Documentation
    • GCD Calculator API Documentation
    • Hash API Documentation
    • Helix PSA API Documentation
    • LCM Calculator API Documentation
    • Leap Year Checker API Documentation
    • Lorem API Documentation
    • Molar Mass Calculator API Documentation (#Experimental)
    • MycoNom API Documentation
    • Name Generator API Documentation
    • Palindrome Checker API Documentation
    • Password Generator API Documentation
    • Password Strength Detector API Documentation
    • Periodic Table API Documentation
    • Prime Number Checker API Documentation
    • Quadratic Equation Solver API Documentation
    • Random Facts Generator API Documentation
    • Random Quotes Generator API Documentation
    • Roman Numeral Converter API Documentation
    • Simple Interest Calculator API Documentation
    • Slugify API Documentation
    • Text Case Converter API Documentation
    • Unit Converter API Documentation
    • Username Generator API Documentation
    • UUID Generator API Documentation
    • Vowel Counter API Documentation
  • Package Documentation
    • BlurJS Package Documentation
      • BlurJS Usage Examples
      • BlurJS Reference Documentation
    • CodeSafe Package Documentation
      • CodeSafe Reference
        • CodeSafe Functions
    • DeepDefend Package Documentation
      • DeepDefend Reference
        • Attacks Functions
        • Defenses Functions
    • DupliPy Package Documentation
      • DupliPy Reference
        • Formatting Functions
        • Replication Functions
        • Similarity Functions
        • Text Analysis Functions
    • FuncProfiler Package Documentation
      • FuncProfiler Reference
        • FuncProfiler Functions
    • Hued Package Documentation
      • Hued Reference
        • Analysis Functions
        • Colors Functions
        • Conversions Functions
        • Palettes Functions
    • LocalSiteMap Package Documentation
      • LocalSiteMap Reference
        • LocalSiteMap Functions
    • PyAutoPlot Package Documentation
      • PyAutoPlot Reference
        • PyAutoPlot Functions
    • PyWebScrapr Package Documentation
      • PyWebScrapr Reference
        • PyWebScrapr Functions
    • ValX Package Documentation
      • ValX Reference
        • ValX Functions
Powered by GitBook
On this page
  • Get temperature
  • Is neutral
  • Brightness
  • Is pastel
  • Is muted
  • Is vibrant
  • RGB to linear
  • Get luminance
  • Get vibrancy
  • Color contrast
  • Get text color from background

Was this helpful?

  1. Package Documentation
  2. Hued Package Documentation
  3. Hued Reference

Analysis Functions

PreviousHued ReferenceNextColors Functions

Last updated 5 months ago

Was this helpful?

Available functions:

  • (rgb): Determine the temperature of a color based on its RGB values.

  • (rgb): Check if a color is neutral.

  • (rgb): Calculate the brightness of a color.

  • (rgb): Check if a color is pastel.

  • (rgb): Check if a color is muted.

  • (rgb): Check if a color is vibrant.

  • (rgb): Convert RGB values to linear RGB.

  • (rgb): Calculate the relative luminance of an RGB color.

  • (rgb): Calculate the vibrancy of an RGB color.

  • (color1, color2): Calculates the contrast ratio between two colors using their RGB values.

  • (background_color): Determines whether the text should be "light" or "dark" based on the background color.


Get temperature

Determine the temperature of a color based on its RGB values.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    str: "Warm" if the color is warm, "Cool" if cool, or "Neutral" if neither.

Is neutral

Check if a color is neutral.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    bool: True if the color is neutral, False otherwise.

Brightness

Calculate the brightness of a color.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    float: The brightness of the color as a value between 0 and 1.

Is pastel

Check if a color is pastel.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    bool: True if the color is pastel, False otherwise.

Is muted

Check if a color is muted.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    bool: True if the color is muted, False otherwise.

Is vibrant

Check if a color is vibrant.

Parameters:
    rgb (tuple): A tuple containing the RGB values (r, g, b).

Returns:
    bool: True if the color is vibrant, False otherwise.

RGB to linear

Convert RGB values to linear RGB.

Parameters:
    rgb (tuple): A tuple of three integers representing the RGB values (r, g, b), each in the range [0, 255].

Returns:
    list: A list of three floats representing the linear RGB values.

Get luminance

Calculate the relative luminance of an RGB color.

Parameters:
    rgb (tuple): A tuple of three integers representing the RGB values (r, g, b), each in the range [0, 255].

Returns:
    float: The calculated relative luminance of the RGB color.

Get vibrancy

Calculate the vibrancy of an RGB color.

Parameters:
    rgb (tuple): A tuple of three integers representing the RGB values (r, g, b), each in the range [0, 255].

Returns:
    float: The calculated vibrancy of the RGB color.

Color contrast

Calculate the vibrancy of an RGB color.

Parameters:
    color1 (tuple): The first RGB color as a tuple of three integers (R, G, B).
    color2 (tuple): The second RGB color as a tuple of three integers (R, G, B).

Returns:
    float: The contrast ratio between the two colors.

Get text color from background

Determines whether the text should be "light" or "dark" based on the background color.

Parameters:
    background_color (tuple): The background RGB color as a tuple of three integers (R, G, B).

Returns:
    str: "light" if the background is dark and vibrant, "dark" if the background is bright and muted.
get_temperature
is_neutral
brightness
is_pastel
is_muted
is_vibrant
rgb_to_linear
get_luminance
get_vibrancy
color_contrast
get_text_color_from_background