I hereby claim:
- I am benbb96 on github.
- I am benbb96 (https://keybase.io/benbb96) on keybase.
- I have a public key ASCdLymXT9FPSHlA5FTUEnihbTbOYxnwJ-nWzB5rLyctRgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from random import randint | |
def generate_random_hex_color(minimum=50, maximum=255): | |
""" | |
Generate a random HEX color (with a minimum brightness by default) | |
:param int minimum: the minimum value of each color (Red, Green, Blue) | |
:param int maximum: the maximum value of each color | |
:return: for example #B4F714 | |
:rtype: str |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Parcel Sandbox</title> | |
<meta charset="UTF-8" /> | |
<link href="/styles.css" rel="stylesheet"> | |
</head> | |
<body> |
BLACK_COLOR = "#000000" | |
WHITE_COLOR = "#FFFFFF" | |
def get_contrast_color(background_color: str) -> str: | |
""" | |
Util function to determine what's the best color between black or white to choose for a text | |
depending on the background color given in parameter. | |
Based on algorythm from WCAG 2.0 explained here : https://www.w3.org/TR/WCAG20-TECHS/G18.html#G18-tests | |
:param background_color: the background color in HEX format (eg: #9D412B) |
<?php | |
class Database | |
{ | |
// Database connexion informations to replace | |
private $host = '[localhost|127.0.0.1]'; | |
private $user = '[usr]'; | |
private $pass = '[pwd]'; | |
private $dbname = '[db-name]'; |