475 links
268 private links
  • When 140 characters is not enough!
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
3 results tagged webdev x
  • This is still a motherfucking website.

    This is still a motherfucking website.
    And it's more fucking perfect than the last guy's.
    Seriously, it takes minimal fucking effort to improve this shit.

    June 10, 2024 at 09:07:29 GMT+2 * - permalink -
    QRCode
    - http://bettermotherfuckingwebsite.com/
    web webdev
  • Texte en noir ou en blanc en fonction de la couleur de fond
    //rgb 8 bits
    int r = 255, g = 255, b = 255;
    
    //sRGB (r', g' et b')
    double rp = 0.0, gp = 0.0, bp = 0.0;
    
    //L
    double luma = 0.0;

    convertir ici la couleur de fond, peu importe la méthode et la source, et stocker les composantes RGB (valeurs entières sur 8 bits, donc de 0 à 255 pour chaque composante) dans r, g et b.


    //Rec.709
    //luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
    
    //Rec.601
    //luma = 0.299 * r + 0.587 * g + 0.114 * b;
    
    //Relative luminance from sRGB
    //https://www.w3.org/TR/WCAG20/relative-luminance.xml
    
    rp = r / 255.0;
    gp = g / 255.0;
    bp = b / 255.0;
    
    if (rp <= 0.03928) rp = rp / 12.92; else rp = Math.Pow((rp + 0.055) / 1.055, 2.4);
    if (gp <= 0.03928) gp = gp / 12.92; else gp = Math.Pow((gp + 0.055) / 1.055, 2.4);
    if (bp <= 0.03928) bp = bp / 12.92; else bp = Math.Pow((bp + 0.055) / 1.055, 2.4);
    
    luma = (0.2126 * rp) + (0.7152 * gp) + (0.0722 * bp);
    
    //http://www.w3.org/TR/WCAG20/#contrast-ratiodef
    return luma > 0.179 ? "#000000" : "#ffffff";

    À noter : 

    • Rec.601 : contenu SD
    • Rec.709 : contenu HD
    • Rec.2020 : contenu UHD + SDR, étendu via Rec.2100 pour HDR

    Avec Rec.2020 :

    luma = 0.2627 * r + 0.678 * g +  0.0593 * b

    À noter aussi :

    • 8 bits, espace partiel 16-235 (0 et 255 réservés pour référence temporelle).
    • 10 bits : 4 à 1019 (0-3 et 1020-1023 réservés pour référence temporelle).
    • 12 bits : 16 à 4079 (0-15 et 4080-4095 réservés pour référence temporelle).

    Pour plus d'infos : https://www.itu.int/rec/R-REC-BT.2020-2-201510-I/en

    April 10, 2024 at 12:13:25 GMT+2 * - permalink -
    QRCode
    - https://shaarli.chibi-nah.net/shaare/JMgQGQ
    webdev webdesign couleurs
  • Code Boxx – Inspire your inner programmer

    Code Boxx is all about inspiring your inner programmer. We offer web development tips and have various free tutorials for HTML, CSS, JS, PHP, etc...

    April 12, 2023 at 12:08:52 GMT+2 * - permalink -
    QRCode
    - https://code-boxx.com
    tips css html html5 webdev
Links per page: 20 50 100
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation