mirror of
https://github.com/theoleuthardt/werkzeugkiste.git
synced 2026-06-13 09:37:53 +00:00
fix: prettier formating
This commit is contained in:
parent
544ebaa7cf
commit
7b4ef9c70b
13 changed files with 172 additions and 154 deletions
|
|
@ -18,7 +18,8 @@ export async function colorConvert(app: FastifyInstance) {
|
|||
if (!data) {
|
||||
return reply.status(400).send({ error: "No RGB declared!" });
|
||||
}
|
||||
const hex = (`#${(+data.red).toString(16).padStart(2, "0")}${(+data.green).toString(16).padStart(2, "0")}${(+data.blue).toString(16).padStart(2, "0")}`).toUpperCase();
|
||||
const hex =
|
||||
`#${(+data.red).toString(16).padStart(2, "0")}${(+data.green).toString(16).padStart(2, "0")}${(+data.blue).toString(16).padStart(2, "0")}`.toUpperCase();
|
||||
reply.header("Content-Type", "text/plain").status(200).send(hex);
|
||||
} catch (error) {
|
||||
console.error("Convert error:", error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue