
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Streamlit component for color selection with support for solid colors and gradients
Um componente Streamlit para seleção de cores com suporte a cores sólidas e gradientes lineares.
pip install color-selector
import streamlit as st
from color_selector import color_selector
# Lista de cores disponíveis (cores sólidas e gradientes)
colors = [
{"name": "Vermelho", "color": "#FF0000"},
{"name": "Azul", "color": "#0000FF"},
{"name": "Verde", "color": "#00FF00"},
{"name": "Gradiente Azul-Verde", "color": ["#0000FF", "#00FF00"]},
{"name": "Gradiente Vermelho-Amarelo", "color": ["#FF0000", "#FFFF00"]},
{"name": "Gradiente Arco-íris", "color": ["#FF0000", "#00FF00", "#0000FF"]}
]
# Usar o componente
selected_color = color_selector(colors=colors, key="color_picker")
st.write(f"Cor selecionada: {selected_color}")
{"name": "Nome da Cor", "color": "#FF0000"}
{"name": "Nome do Gradiente", "color": ["#FF0000", "#00FF00"]}
Para executar em modo de desenvolvimento:
cd template_copy/color_selector/frontend
npm install
npm run start
Em outro terminal:
streamlit run template_copy/example.py
import streamlit as st
from color_selector import color_selector
st.title("Seletor de Cores")
# Exemplos de cores
colors = [
{"name": "Vermelho", "color": "#FF0000"},
{"name": "Azul", "color": "#0000FF"},
{"name": "Verde", "color": "#00FF00"},
{"name": "Amarelo", "color": "#FFFF00"},
{"name": "Roxo", "color": "#800080"},
{"name": "Laranja", "color": "#FFA500"},
{"name": "Gradiente Azul-Verde", "color": ["#0000FF", "#00FF00"]},
{"name": "Gradiente Vermelho-Amarelo", "color": ["#FF0000", "#FFFF00"]},
{"name": "Gradiente Arco-íris", "color": ["#FF0000", "#00FF00", "#0000FF"]}
]
# Usar o componente
selected_color = color_selector(colors=colors, key="color_picker")
if selected_color:
st.write(f"**Cor selecionada:** {selected_color['name']}")
st.write(f"**Valor:** {selected_color['color']}")
FAQs
Streamlit component for color selection with support for solid colors and gradients
We found that color-selector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.