有没有一种方法可以将HEX颜色转换为HTML,CSS或Python中的视觉颜色?

时间:2020-06-26 18:12:10

标签: html css mongodb flask python-3.6

我一直在从事HTML表单项目,以了解有关MongoDB,CSS,HTML,Python的更多信息。我使用Flask在PyCharm中将Python,HTML和CSS组合在一起。在测试代​​码以查看是否可以将其导入MongoDB的Atlas时,我看到颜色已存储在HEX中。有什么方法可以将十六进制颜色转换为视觉颜色?这是表单中的代码,其中(取决于浏览器和操作系统)显示一个颜色选择器。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Form Page</title>
    <style>
        body{
        background-color:lightblue;
        }

    </style>
</head>
<body>
<form method="post">
    <h1>Random Form to learn about Forms in HTML</h1>
    <h3>Enter your first name</h3>
    <input type="text" placeholder="Enter your first name" name="first_name">
    <h3>Enter your last name</h3>
    <input type="text" placeholder="Enter your last name" name="last_name">
    <h3>Are you male or female</h3>
    <input type="radio" name="Gender"value="Male">
    <label>Male</label>
    <br>
    <input type="radio" name="Gender"value="Female">
    <label>Female</label>
    <br>
    <h3>Select your favorite color</h3>
    <input type="color" name="color">
    <h3>Enter your date of birth</h3>
    <input type="datetime" name="date">
    <h3>Enter an email we can contact you at</h3>
    <input type="email" name="email">
    <br>
    <input type="submit" name="Submit"></form>


</body>
</html>

下一个辅助代码段将是显示页面,每个人都可以看到提交表单的人。这是MongoDB页面,因为您无权访问其他页面:

Image of MongoDB Photo

如您在图像中所见,照片显示了十六进制颜色。大多数人不了解十六进制,因此是否可以使用某种类型的代码(无论是否是第三方)将其转换为视觉颜色?谢谢

0 个答案:

没有答案