ImageColorPicker.com

    RGB to HSL converter

    Fetola 'mala ofe kapa ofe oa RGB ho HSL — hanghang ebile mahala

    #9B59B6

    Manamisa boleng bofe kapa bofe ba 'mala — re tla tseba fomate bakeng sa wena.

    R
    G
    B
    kaho ea HSL
    hsl(283, 39%, 53%)
    Mmala
    283°
    Bophara ba mmala
    39%
    Leseli
    53%

    Mebala ena ka mekhahlelo yohle

    RGB e bolella skrini hore e tlose leseli le bokae; HSL e u bontša hore 'mala o shebahala jwang ka nnete. Ho fetola likanale tse tharo hore e be 'hue', 'saturation' le 'lightness' ho etsa hore 'mala e be bonolo ho o fetola ka letsoho.

    Mokhoa oa ho fetoha ho tloha RGB ho ea ho HSL

    1. Arolela R, G le B ka 255 hore boleng bo bong le bo bong bo be lipakeng tsa 0 le 1.
    2. Nka kholo ka ho fetisisa le nyane ka ho fetisisa ea tse tharo — sekala sa tsona ke 'lightness' L.
    3. Haeba kholo le nyane li lekana, 'mala ke grey: 'hue' le 'saturation' ka bobeli ke 0.
    4. Ha ho sa joalo fumana S ho tsoa phapang pakeng tsa kholo le nyane, 'me bala H ho tsoa ho kanaleng efe kapa efe e kholo ka ho fetisisa.

    Mohlala o sebetsang

    RGB rgb(155, 89, 182)=HSL hsl(283, 39%, 53%)

    Ho nepahala ka molao-motheo. Hobane H, S le L hangata li bontšoa e le lipalo tse potolohileng, ho fetola hape ho ka fetola kanaleng ka mohato o le mong kapa o mabeli.

    RGB le HSL li hlalositsoe

    Ke eng RGB?

    RGB e hlalosa 'mala e le litsela tse tharo tsa leseli — red, green le blue — e ' ngoe le e ' ngoe ho tloha 0 ho isa 255. E bontša kamoo skrine e sebetsang ka teng: tse tharo kaofela ho 255 li fana ka tšoeu, kaofela ho 0 li fana ka ntsho. RGB ke khetho e nepahetseng ha o hloka ho bala le 'mala, 'me rgba() e eketsa ho pepeseha ka holim'a eona.

    Sinthaxe:
    rgb(R, G, B)
    Mekhahlelo:
    0–255 ka tsela
    E loketse bakeng sa:
    khoutu, canvas, pepeseho ka rgba()

    Ke eng HSL?

    HSL e arola 'mala ka hue (0–360° letamong la mebala), saturation (bokgutshwane ba 'mala, 0–100%) le lightness (bofubelu kapa bontsho, 0–100%). Hobane karolo e ' ngoe le e ' ngoe e tšoana le mokhoa oo batho ba hlalosang mebala ka oona, HSL ke fomate e bonolo ka ho fetisisa ho aha tints, shades le palette e lumellanang — ka letsoho kapa ka khoutu.

    Sinthaxe:
    hsl(H, S%, L%)
    Mekhahlelo:
    0–360°, 0–100%, 0–100%
    E loketse bakeng sa:
    mapalete, tints le shades, theming

    RGB to HSL reference table

    Mebala e tlamehang ka CSS, e fetotsoe ho tswa ho RGB ho ea ho HSL.

    'MalaRGBHSL
    blackrgb(0, 0, 0)hsl(0, 0%, 0%)
    whitergb(255, 255, 255)hsl(0, 0%, 100%)
    redrgb(255, 0, 0)hsl(0, 100%, 50%)
    limergb(0, 255, 0)hsl(120, 100%, 50%)
    bluergb(0, 0, 255)hsl(240, 100%, 50%)
    yellowrgb(255, 255, 0)hsl(60, 100%, 50%)
    orangergb(255, 165, 0)hsl(39, 100%, 50%)
    tealrgb(0, 128, 128)hsl(180, 100%, 25%)
    purplergb(128, 0, 128)hsl(300, 100%, 25%)
    grayrgb(128, 128, 128)hsl(0, 0%, 50%)

    Lipotso tse botsoang khafetsa