CN112015417B - Method and device for determining theme colors of application programs - Google Patents
Method and device for determining theme colors of application programs Download PDFInfo
- Publication number
- CN112015417B CN112015417B CN202010907011.3A CN202010907011A CN112015417B CN 112015417 B CN112015417 B CN 112015417B CN 202010907011 A CN202010907011 A CN 202010907011A CN 112015417 B CN112015417 B CN 112015417B
- Authority
- CN
- China
- Prior art keywords
- value
- color
- hue
- theme
- color value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Color Image Communication Systems (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The application discloses a method and a device for determining theme colors of application programs, which are used for accurately determining the theme colors of the application programs, wherein the method comprises the following steps: acquiring a first theme color value in an enterprise identifier corresponding to an application program, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value; acquiring a second theme color value of other application programs, including a second hue value; removing the second hue value from the third hue value in the preset range of the first hue value to obtain a fourth hue value; adjusting the first saturation value and the first brightness value, and forming a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value; determining a second color value to be selected from the first color value to be selected according to the Lab color mode; the second color value to be selected is adjusted to be a third color value to be selected, wherein the contrast of the third color value to be selected meets the preset condition; and determining the theme color of the application program according to the test result of displaying the third color value to be selected on different equipment.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a theme color of an application program.
Background
In the product design of an application, the theme colors of the application need to be selected and determined. In the prior art, the theme colors of an application are mainly selected according to the brand colors of enterprises. The selection method is high in subjectivity, only about the selection of colors on hue, and influences on the appearance of products caused by deviation of fine color values are not considered, so that the theme colors determined by the method are lack of rigor and are not unique.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method and an apparatus for determining an application theme color, which are used for rigorous analysis and uniquely determining the application theme color.
In order to solve the above problems, the technical solution provided in the embodiments of the present application is as follows:
a method of determining a color of an application theme, the method comprising:
acquiring a first theme color value in an enterprise identifier of an enterprise to which an application belongs, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value;
acquiring second theme color values of other application programs of an enterprise to which the application program belongs, wherein the second theme color values comprise second hue values;
Obtaining a third hue value within a preset range of the first hue value, and removing the second hue value from the third hue value to obtain a fourth hue value;
according to the association relation between the enterprise identification theme color value and the application program theme color value, the first saturation value and the first brightness value are adjusted, and a plurality of first color values to be selected are formed by the fourth hue value, the adjusted first saturation value and the adjusted first brightness value;
determining a second color value to be selected from the first color value to be selected according to the Lab color mode;
the second color value to be selected is adjusted to be a third color value to be selected, wherein the contrast of the third color value to be selected accords with a first preset condition;
and acquiring a test result after the third color value to be selected is displayed on different equipment, and determining the theme color of the application program from the third color value to be selected.
In one possible implementation manner, the adjusting the first saturation value and the first brightness value according to the association relationship between the enterprise identifier theme color value and the application theme color value, and forming a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value includes:
According to the association relation between the enterprise identification theme color value and the application program theme color value, the first saturation value is reduced to obtain at least one second saturation value, and the first brightness value is improved to obtain at least one second brightness value;
and combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
In one possible implementation manner, the determining, according to the Lab color mode, the second candidate color value from the first candidate color value includes:
removing the color values, of which the hue values do not meet the second preset condition, in the first color value to be selected to obtain a fourth color value to be selected;
after converting the fourth color value to be selected from the HSB color mode to the Lab color mode, increasing the brightness value under the Lab color mode, and converting back to the HSB color mode to obtain a second color value to be selected.
In a possible implementation manner, the adjusting the second candidate color value to a third candidate color value with a contrast meeting a first preset condition includes:
judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition or not;
If yes, determining the second color value to be selected as a third color value to be selected;
and if not, adjusting the brightness value of the second color value to be selected to obtain a third color value to be selected.
In a possible implementation manner, if the second color value does not match, adjusting the brightness value of the second color value to obtain a third color value to be selected, including:
if the brightness values do not meet the first preset conditions, at least one third color value corresponding to each second color value is obtained by taking the ratio of the brightness value of the adjusted second color value to the brightness value of the background color as a target.
An apparatus for determining a color of an application theme, the apparatus comprising:
the first acquisition unit is used for acquiring a first theme color value in an enterprise identifier of an enterprise to which the application program belongs, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value;
the second acquisition unit is used for acquiring second theme color values of other application programs of enterprises to which the application programs belong, wherein the second theme color values comprise second hue values;
a third obtaining unit, configured to obtain a third hue value within the preset range of the first hue value, and remove the second hue value from the third hue value to obtain a fourth hue value;
The first determining unit is configured to, after adjusting the first saturation value and the first brightness value according to the association relationship between the enterprise identifier theme color value and the application theme color value, form a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value;
the second determining unit is used for determining a second color value to be selected from the first color value to be selected according to the Lab color mode;
the adjusting unit is used for adjusting the second color value to be selected into a third color value with contrast meeting a first preset condition;
and the third determining unit is used for determining the theme color of the application program from the third color value to be selected when the test result after the third color value to be selected is displayed on different equipment is obtained.
In one possible implementation manner, the first determining unit includes:
the adjustment subunit is used for reducing the first saturation value according to the association relation between the enterprise identification theme color value and the application program theme color value to obtain at least one second saturation value, and improving the first brightness value to obtain at least one second brightness value;
And the first acquisition subunit is used for combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
In one possible implementation manner, the second determining unit includes:
a removing subunit, configured to remove a color value in the first color value to be selected, where the hue value does not meet the second preset condition, to obtain a fourth color value to be selected;
the second obtaining subunit is configured to convert the fourth color value to be selected from the HSB color mode to the Lab color mode, then increase the brightness value in the Lab color mode, and convert the brightness value back to the HSB color mode to obtain a second color value to be selected.
In one possible implementation, the adjusting unit includes:
the judging subunit is used for judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition;
a determining subunit, configured to determine, when a ratio of a brightness value in the second color value to be selected to a brightness value in a background color meets a first preset condition, the second color value to be selected as a third color value to be selected;
and the third acquisition subunit is used for acquiring a third color value to be selected after adjusting the brightness value of the second color value to be selected when the ratio of the brightness value in the second color value to be selected to the brightness value in the background color does not accord with the first preset condition.
In one possible implementation manner, the third obtaining subunit is specifically configured to obtain at least one third to-be-selected color value corresponding to each second to-be-selected color value, where the ratio of the brightness value of the adjusted second to-be-selected color value to the brightness value of the background color meets the first preset condition, when the ratio of the brightness value of the second to-be-selected color value to the brightness value of the background color does not meet the first preset condition.
From this, the embodiment of the application has the following beneficial effects:
the method comprises the steps of obtaining a first theme color, a first hue value, a first saturation value and a first brightness value of the first theme color in an enterprise identifier of an enterprise to which an application belongs. And acquiring a second theme color value and a second hue value of the second theme color value of other application programs of the enterprise to which the application program belongs. And obtaining a fourth hue value by obtaining a third hue value in a preset range of the first hue value and removing the second hue value from the third hue value. And adjusting the first saturation value and the first brightness value according to the association relation between the enterprise identification theme color and the application program theme color value. And forming a plurality of first color values to be selected by the fourth hue value, the adjusted first saturation value and the first brightness value. And determining a second color value to be selected from the first color value to be selected through the Lab color mode. And adjusting the second color value to be a third color value with the contrast meeting the first preset condition. And obtaining test results of displaying the third color value to be selected on different equipment, and determining the theme color of the application program from the third color value to be selected according to the test results.
In the method for determining the theme color of the application program provided by the embodiment of the application program, the theme color of the application program is determined by multi-step deduction, adjustment and screening on the basis of the theme color of the enterprise identifier of the enterprise to which the application program belongs, and the finally determined theme color of the application program is uniquely determined on hue value, saturation value and brightness value, and the determined theme color of the application program has uniqueness.
Drawings
FIG. 1 is a flowchart of a method for determining a theme color of an application according to an embodiment of the present application;
fig. 2 is a schematic diagram of an apparatus for determining a theme color of an application according to an embodiment of the present application.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures and detailed description are described in further detail below.
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the following description will first explain the background technology of the embodiments of the present application.
In product design, it is desirable to select and determine the theme colors of the product, for example, to select and determine the theme colors of an application. Currently, determining the theme colors of an application is mainly selected according to the brand colors of enterprises to which the application belongs. The selection method is essentially hue selection and determination, is strong in subjectivity, does not consider the influence on the appearance of the product caused by the deviation of the color value, and causes the final determined theme color to lack rigor and not have uniqueness.
Based on this, the embodiment of the application provides a determination scheme of the theme colors of the application, which includes: a first theme color and a first hue value, a first saturation value and a first brightness value of the first theme color in an enterprise identifier of an enterprise to which the application belongs are acquired. And acquiring a second theme color value and a second hue value of the second theme color value of other application programs of the enterprise to which the application program belongs. And obtaining a fourth hue value by obtaining a third hue value in a preset range of the first hue value and removing the second hue value from the third hue value. And adjusting the first saturation value and the first brightness value according to the association relation between the enterprise identification theme color and the application program theme color value. And forming a plurality of first color values to be selected by the fourth hue value, the adjusted first saturation value and the first brightness value. And determining a second color value to be selected from the first color value to be selected through the Lab color mode. And adjusting the second color value to be a third color value with the contrast meeting the first preset condition. And obtaining test results of displaying the third color value to be selected on different equipment, and determining the theme color of the application program from the third color value to be selected according to the test results.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the method for determining the theme colors of the application provided by the embodiments of the present application is described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a method for determining a theme color of an application according to an embodiment of the present application, as shown in fig. 1, the method may include S101 to S107:
s101: a first theme color value in an enterprise identifier of an enterprise to which the application belongs is obtained, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value.
To determine a theme color of an application, a first theme color value in an enterprise identifier of an enterprise to which the application belongs is first obtained. Wherein the first theme color value refers to a color value in HSB color mode. The first theme color value includes a first hue value, a first saturation value, and a first brightness value.
The HSB color mode includes hue, saturation and brightness, and is a mode based on human perception of color, in which the determination of the subject color is performed in accordance with the perception of color by the user. Hue, saturation and brightness of the HSB color mode are denoted by H, S and B, respectively. On a standard color wheel of 0-360 degrees, the hues are measured by position, and in practical use, the hues are identified by color names, such as red, green or yellow. Saturation refers to the intensity or purity of a color, and lightness is the relative darkness of the color. The HSB color mode characterizes colors by three attributes of hue, saturation and brightness, and the three attributes of the colors are quantized, for example, H:346, S:71 and B:100 represent one color.
In one embodiment, when the enterprise owns the first theme color value of the enterprise identifier, the first theme color value in the enterprise identifier of the enterprise to which the application belongs may be directly acquired.
In another embodiment, when the business does not have the first theme color value of the business identifier, the first theme color value in the business identifier of the business to which the application belongs needs to be acquired by means of a brand story method. Wherein, the brand story law refers to a method for determining the hue of brand colors by combining brand genes and color psychology. Specifically, brand keywords in enterprise brand genes can be extracted, and the keywords and color characters in color psychology are combined to determine the positioning of brand color and phase. After the hue of the brand color is determined by the brand story method, the first theme color value in the enterprise identifier of the enterprise to which the application program belongs can be determined according to the hue of the brand color.
S102: and acquiring second theme color values of other application programs of the enterprise to which the application program belongs, wherein the second theme color values comprise second hue values.
The enterprise to which the application belongs may also have other applications, and a second theme color value of the other applications of the enterprise to which the application belongs is obtained, where the second theme color value includes a second hue value.
It should be understood that, in order to ensure the uniqueness of the theme color of the application, the second theme color values already used by other applications of the enterprise to which the application belongs are not reused, and the second theme color values of other applications of the enterprise to which the application belongs need to be acquired, and the second hue values in the second theme color values need to be screened out.
S103: and obtaining a third hue value within a preset range of the first hue value, and removing the second hue value from the third hue value to obtain a fourth hue value.
After the first hue value of the enterprise identifier of the enterprise to which the application program belongs is obtained, in order to ensure the uniqueness of the theme color of the application program, a third hue value within a preset range of the first hue value is obtained, and the second hue value is removed from the third hue value, so that a fourth hue value is obtained.
In some embodiments, the predetermined range may be a range within a predetermined angle from the first hue value in HSB mode, such as a range of about 30 degrees from the first hue value, and such as a range of about 10 degrees from the first hue value. If the first hue value is 346 degrees, the preset range may be a range of color values between 336 degrees and 356 degrees.
The operation of removing the second hue value from the second theme color values of other application programs of the enterprise to which the application program belongs, that is, removing the second hue value from the third hue value, and obtaining the fourth hue value belongs to a deduplication process in the vertical direction performed on the basis of the first hue value.
S104: and adjusting the first saturation value and the first brightness value according to the association relation between the enterprise identification theme color value and the application program theme color value, and forming a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value.
And adjusting the first saturation value and the first brightness value according to the association relation between the acquired enterprise identification theme color value and the application program theme color value. The obtained fourth hue value, the adjusted first saturation value and the adjusted first brightness value may constitute a plurality of color values, referred to as first color values to be selected. It should be noted that, according to the association relationship between the obtained enterprise identification theme color value and the application program theme color value, the operation of adjusting the first saturation value and the first brightness value belongs to the adjustment processing performed in the transverse direction based on the first theme color value.
In specific implementation, the method can comprise the following two steps:
according to the association relation between the enterprise identification theme color value and the application program theme color value, reducing the first saturation value to obtain at least one second saturation value, and improving the first brightness value to obtain at least one second brightness value;
And combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
It should be noted that, by analyzing a large number of enterprise identification topic color values and corresponding application topic color values, the association relationship between the enterprise identification topic color values and the application topic color values can be obtained. The association of the enterprise-identification theme color value with the application-theme color value is generally such that the saturation of the application-theme color value is lower than the saturation of the enterprise-identification theme color value, and the lightness of the application-theme color value is higher than the lightness of the enterprise-identification theme color value. And according to the association relation, a first preset value is required to be reduced for the first saturation value, a second preset value is increased for the first brightness value, and the second saturation value and the second brightness value which are more in line with the association relation are obtained, wherein the number of the first preset value and the second preset value can be multiple. For example, the first saturation value is 71, the first preset value is 5 and 10, respectively, the second saturation value is 66 and 61, the first brightness value is 100, the second preset value is 5 and 10, respectively, and the second brightness value is 105 and 110.
It should be further noted that, according to the second hue value of other application programs of the enterprise to which the application program belongs, after the first saturation value and the first brightness value are adjusted according to the association relationship between the enterprise identification theme color value and the application program theme color value in the vertical direction, each fourth hue value, each second saturation value and each second brightness value are obtained, and then each fourth hue value, each second saturation value and each second brightness value may be combined to obtain a plurality of first color values to be selected. In some embodiments, each fourth hue value, each second saturation value, and each second brightness value may be randomly combined to obtain all combinations, obtain color values in all combinations, and use all obtained color values as the first color value to be selected.
S105: and determining a second color value to be selected from the first color value to be selected according to the Lab color mode.
And after the first color value to be selected is obtained, screening and subtracting the first color value to be selected in the Lab color mode to obtain a second color value to be selected. The Lab color mode is a color code used by a color management system, has a large color gamut, exceeds the visual range of people, and is a device-independent color model. Where L is used to identify lightness, a is used to identify the red to green range, and b is used to identify the yellow to blue range.
In specific implementation, determining the second candidate color value from the first candidate color value according to the Lab color mode may include the following steps:
removing the color values, of which the hue values do not meet the second preset condition, in the first color value to be selected to obtain a fourth color value to be selected;
after converting the fourth color value to be selected from the HSB color mode to the Lab color mode, increasing the brightness value in the Lab color mode, and converting back to the HSB color mode to obtain a second color value to be selected.
In the natural world, the color of an object is biased toward warm color under the condition of natural illumination. In the HSB mode, the hue of 180 degrees is a cold pole hue, the hue value of 360 degrees is a warm pole hue, and the hue values of 90 degrees and 270 degrees are neutral colors having different hue values, and the color value between 0 degrees (i.e., 360 degrees) and 180 degrees changes from the warm pole hue to the neutral hue, changes to the cold pole hue again, and the color value between 180 degrees and 360 degrees changes from the cold pole hue to the neutral hue and changes to the warm pole hue again. By utilizing the rule, in order to determine the theme colors of the application program which are more in line with the natural color development effect, the colors of which the hue values are not in line with the second preset condition in the first color value to be selected are removed, and a fourth color value to be selected is obtained. The second preset condition may be a hue with a hue value greater than the first hue value, i.e. a hue warmer than the first hue value.
It should also be noted that the object color exhibits a higher brightness when illuminated. With the rule, in order to present better color effect, after the HSB color mode of the fourth color to be selected is converted into the Lab color mode of the large color gamut, the brightness value in the Lab color mode is improved. And finally, converting the processed color value back to the HSB color mode, thereby obtaining a second color value to be selected.
S106: and adjusting the second color value to be a third color value with the contrast meeting the first preset condition.
And after the second color value to be selected is obtained, the contrast of the second color value to be selected is adjusted according to the requirement meeting the first preset condition, and after adjustment, a third color value to be selected is obtained. The contrast is a ratio of the brightness value in the color value to the brightness value in the background color.
In specific implementation, the method for adjusting the second color value to be selected to be a third color value with the contrast meeting the first preset condition comprises the following steps:
judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition or not;
if yes, determining the second color value to be selected as a third color value to be selected;
And if the color values do not accord with the first color value, adjusting the brightness value of the second color value to obtain a third color value to be selected.
It should be noted that, according to the color barrier-free design standard, the requirements of WCAG2.0AA level contrast are met by the visual presentation and the text graphic, that is, the visual presentation and the text graphic are at least met by 4.5:1 contrast, considering users with visual barriers and bad use environments. Therefore, to improve applicability of application theme colors and better user experience, the color contrast is adjusted to be greater than or equal to 4.5:1.
It should be noted that the background color may be black or white, and the background color has a corresponding brightness value. After the brightness value of the background color is determined, a ratio of the brightness value in the second candidate color value to the brightness value of the background color may be calculated.
Further, calculating the ratio of the brightness value in the second color value to be selected to the brightness value in the background color, judging whether the calculated ratio at least meets 4.5:1, and if so, determining the second color value to be selected as a third color value to be selected. And when the calculated ratio cannot at least meet 4.5:1, adjusting the brightness value of the second color value to be selected, and adjusting the ratio of the brightness value of the adjusted second color value to the brightness value in the background color according to the first preset condition as a target, and obtaining at least one third color value corresponding to each second color value to be selected after adjustment.
It should be noted that, when the brightness value of the second color value to be selected is adjusted, the hue and saturation of the second color to be selected are unchanged.
S107: and acquiring a test result after the third candidate color value is displayed on different equipment, and determining the theme color of the application program from the third candidate color value.
After the third color value to be selected is determined, the third color value to be selected is displayed on different equipment, a test result is obtained according to the display condition, and the theme color of the application program is determined from the third color value to be selected according to the test result.
It should be noted that, different devices may be mobile phone devices of different models, the third color value to be selected is displayed on different devices, the color reduction and display effect of the third color value to be selected is tested by a tester, and a test result is generated.
In some embodiments, besides considering testing the third color value to be selected on different devices, the display effects of the third color to be selected under different light rays and different scenes can be comprehensively considered and compared for multiple times, so as to generate a test result. And selecting a color value with the best color reproduction and display effects from the test result, and determining the best color value as the theme color of the application program.
In other embodiments, the test person may choose to be a person of various ages or sexes in order to increase the confidence and stringency of the test results.
Through the technical scheme of the embodiment, a first theme color, a first hue value, a first saturation value and a first brightness value of the first theme color in the enterprise identifier of the enterprise to which the application program belongs are obtained. And acquiring a second theme color value and a second hue value of the second theme color value of other application programs of the enterprise to which the application program belongs. And obtaining a fourth hue value by obtaining a third hue value in a preset range of the first hue value and removing the second hue value from the third hue value. And adjusting the first saturation value and the first brightness value according to the association relation between the enterprise identification theme color and the application program theme color value. And forming a plurality of first color values to be selected by the fourth hue value, the adjusted first saturation value and the first brightness value. And determining a second color value to be selected from the first color value to be selected through the Lab color mode. And adjusting the second color value to be a third color value with the contrast meeting the first preset condition. And obtaining test results of displaying the third color value to be selected on different equipment, and determining the theme color of the application program from the third color value to be selected according to the test results. In the method for determining the theme color of the application program provided by the embodiment of the application program, the theme color of the application program is determined by multi-step deduction, adjustment and screening on the basis of the theme color of the enterprise identifier of the enterprise to which the application program belongs, and the finally determined theme color of the application program is uniquely determined on hue value, saturation value and brightness value, and the determined theme color of the application program has uniqueness.
In order to facilitate understanding and explanation of the method for determining the theme colors of an application provided in the embodiments of the present application, an application example will be described below.
An application program is determined, and a theme color value in an enterprise identifier of an enterprise to which the application program belongs is obtained as a color value in an HSB color mode as 346,100,71. Wherein the hue value is 346 degrees, the saturation value is 71, and the brightness value is 100.
In contrast from the vertical, first, hue values in the theme color values of other application programs of the enterprise to which the application program belongs are acquired, and the hue values in the theme color values of other application programs are 342 degrees, 345 degrees, 350 degrees, 353 degrees, 356 degrees and 3 degrees. Next, a color value range of about 10 degrees, that is, 336 to 356 degrees, of the enterprise identification hue value 346 degrees is obtained. And removing the hue values in the theme color values of other application programs from 336-356 degrees to obtain the rest hue values.
From the transverse comparison, the saturation value is reduced from 71 and the brightness value is increased from 100. New saturation values of 61 and 66 and new brightness values of 105 and 110 are obtained.
And combining the rest hue value, the new saturation value and the new brightness value obtained by removing the hue values of other application programs from 336-356 degrees to obtain all combined color values, wherein the combined color values are the first color value to be selected.
Since the hue value of the enterprise identifier is 346 degrees, a color value with a hue value greater than 346 degrees is removed from the first color value to be selected, namely, a warmth color value is selected. Converting the HSB color mode into the Lab color mode, improving the brightness value of the rest warm color values in the Lab color mode, and converting the rest warm color values back into the HSB color mode to obtain a second color value to be selected.
Selecting the background color as white, calculating or searching the ratio of the brightness value of the second color value to be selected to the brightness value of the white through the existing tool, judging whether the ratio meets 4.5:1, and if the ratio does not meet 4.5:1, adjusting the brightness value in the color value to meet 4.5:1, so as to obtain a third color value to be selected.
And 5 different mobile phone models are selected, the people of different age groups such as pupil, young people and old people are selected, and then the different age groups are distinguished according to the gender of the men and women, so that 6 different testers such as pupil men, pupil women, young people men, young people women, old people men and old people women can be obtained, the color development effect of the third to-be-selected color values in the 5 different mobile phone models is tested, and finally the color value with the optimal test result is selected as the theme color value of the application program.
Referring to fig. 2, fig. 2 is a schematic diagram of an apparatus for determining a theme color of an application according to an embodiment of the present application. In this embodiment, the apparatus may specifically include:
a first obtaining unit 201, configured to obtain a first theme color value in an enterprise identifier of an enterprise to which the application program belongs, where the first theme color value includes a first hue value, a first saturation value, and a first brightness value;
a second obtaining unit 202, configured to obtain a second theme color value of another application program of the enterprise to which the application program belongs, where the second theme color value includes a second hue value;
a third obtaining unit 203, configured to obtain a third hue value within the preset range of the first hue value, and remove the second hue value from the third hue value to obtain a fourth hue value;
a first determining unit 204, configured to, after adjusting the first saturation value and the first brightness value according to the association relationship between the enterprise identifier theme color value and the application theme color value, form a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value;
a second determining unit 205, configured to determine a second color value to be selected from the first color value to be selected according to a Lab color mode;
An adjusting unit 206, configured to adjust the second color value to be selected to a third color value with a contrast that meets a first preset condition;
a third determining unit 207, configured to determine, when a test result after the third candidate color value is displayed on a different device is acquired, a theme color of the application program from the third candidate color value.
Optionally, in some implementations of this embodiment, the first determining unit 204 includes:
the adjustment subunit is used for reducing the first saturation value according to the association relation between the enterprise identification theme color value and the application program theme color value to obtain at least one second saturation value, and improving the first brightness value to obtain at least one second brightness value;
and the first acquisition subunit is used for combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
Optionally, in some implementations of this embodiment, the second determining unit 205 includes:
a removing subunit, configured to remove a color value in the first color value to be selected, where the hue value does not meet the second preset condition, to obtain a fourth color value to be selected;
The second obtaining subunit is configured to convert the fourth color value to be selected from the HSB color mode to the Lab color mode, then increase the brightness value in the Lab color mode, and convert the brightness value back to the HSB color mode to obtain a second color value to be selected.
Optionally, in some implementations of this embodiment, the adjusting unit 206 includes:
the judging subunit is used for judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition;
a determining subunit, configured to determine, when a ratio of a brightness value in the second color value to be selected to a brightness value in a background color meets a first preset condition, the second color value to be selected as a third color value to be selected;
and the third acquisition subunit is used for acquiring a third color value to be selected after adjusting the brightness value of the second color value to be selected when the ratio of the brightness value in the second color value to be selected to the brightness value in the background color does not accord with the first preset condition.
Optionally, in some implementations of this embodiment, the third obtaining subunit is specifically configured to obtain at least one third candidate color value corresponding to each second candidate color value, where the ratio of the brightness value of the adjusted second candidate color value to the brightness value of the background color meets the first preset condition when the ratio of the brightness value of the second candidate color value to the brightness value of the background color does not meet the first preset condition.
Through the technical scheme of the embodiment, the first theme color, the first hue value, the first saturation value and the first brightness value in the enterprise identifier of the enterprise to which the application belongs are based on the first theme color. And in the longitudinal direction, removing the second hue value in the second theme color values of other application programs of the enterprise to which the application program belongs from the third hue value in the preset range of the first hue value to obtain a fourth hue value. And in the transverse direction, adjusting the first saturation value and the first brightness value according to the association relation between the enterprise identification theme color and the application program theme color value. And forming a plurality of first color values to be selected by the fourth hue value, the adjusted first saturation value and the first brightness value. And determining a second color value to be selected from the first color value to be selected through the Lab color mode. And adjusting the second color value to be a third color value with the contrast meeting the first preset condition. And obtaining test results of displaying the third color value to be selected on different equipment, and determining the theme color of the application program from the third color value to be selected according to the test results. In the method for determining the theme color of the application program provided by the embodiment of the application program, the theme color of the application program is determined by multi-step deduction, adjustment and screening on the basis of the theme color of the enterprise identifier of the enterprise to which the application program belongs, and the finally determined theme color of the application program is uniquely determined on hue value, saturation value and brightness value, and the determined theme color of the application program has uniqueness.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant points refer to the description of the method section.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (8)
1. A method for determining a color of an application theme, the method comprising:
acquiring a first theme color value in an enterprise identifier of an enterprise to which an application belongs, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value;
acquiring second theme color values of other application programs of an enterprise to which the application program belongs, wherein the second theme color values comprise second hue values;
obtaining a third hue value within a preset range of the first hue value, and removing the second hue value from the third hue value to obtain a fourth hue value;
According to the association relation between the enterprise identification theme color value and the application program theme color value, the first saturation value and the first brightness value are adjusted, and a plurality of first color values to be selected are formed by the fourth hue value, the adjusted first saturation value and the adjusted first brightness value;
determining a second color value to be selected from the first color value to be selected according to the Lab color mode;
the second color value to be selected is adjusted to be a third color value to be selected, wherein the contrast of the third color value to be selected accords with a first preset condition;
obtaining test results after the third color value to be selected is displayed on different equipment, and determining the theme color of the application program from the third color value to be selected;
the determining, according to the Lab color mode, a second color value to be selected from the first color value to be selected includes:
removing the color values, of which the hue values do not meet the second preset condition, in the first color value to be selected to obtain a fourth color value to be selected;
after converting the fourth color value to be selected from the HSB color mode to the Lab color mode, increasing the brightness value under the Lab color mode, and converting back to the HSB color mode to obtain a second color value to be selected.
2. The method of claim 1, wherein adjusting the first saturation value and the first brightness value according to the association between the enterprise-identified theme color value and the application-identified theme color value, and forming a plurality of first color values to be selected using the fourth hue value, the adjusted first saturation value, and the adjusted first brightness value, comprises:
According to the association relation between the enterprise identification theme color value and the application program theme color value, the first saturation value is reduced to obtain at least one second saturation value, and the first brightness value is improved to obtain at least one second brightness value;
and combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
3. The method of claim 1, wherein adjusting the second candidate color value to a third candidate color value having a contrast that meets a first preset condition comprises:
judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition or not;
if yes, determining the second color value to be selected as a third color value to be selected;
and if not, adjusting the brightness value of the second color value to be selected to obtain a third color value to be selected.
4. A method according to claim 3, wherein said adjusting the brightness value of the second candidate color value to obtain a third candidate color value if not met comprises:
if the brightness values do not meet the first preset conditions, at least one third color value corresponding to each second color value is obtained by taking the ratio of the brightness value of the adjusted second color value to the brightness value of the background color as a target.
5. An apparatus for determining a color of an application theme, the apparatus comprising:
the first acquisition unit is used for acquiring a first theme color value in an enterprise identifier of an enterprise to which the application program belongs, wherein the first theme color value comprises a first hue value, a first saturation value and a first brightness value;
the second acquisition unit is used for acquiring second theme color values of other application programs of enterprises to which the application programs belong, wherein the second theme color values comprise second hue values;
a third obtaining unit, configured to obtain a third hue value within the preset range of the first hue value, and remove the second hue value from the third hue value to obtain a fourth hue value;
the first determining unit is configured to, after adjusting the first saturation value and the first brightness value according to the association relationship between the enterprise identifier theme color value and the application theme color value, form a plurality of first color values to be selected by using the fourth hue value, the adjusted first saturation value and the adjusted first brightness value;
the second determining unit is used for determining a second color value to be selected from the first color value to be selected according to the Lab color mode;
The adjusting unit is used for adjusting the second color value to be selected into a third color value with contrast meeting a first preset condition;
a third determining unit, configured to determine, when a test result after the third candidate color value is displayed on a different device is obtained, a theme color of the application program from the third candidate color value;
the second determination unit includes:
a removing subunit, configured to remove a color value in the first color value to be selected, where the hue value does not meet the second preset condition, to obtain a fourth color value to be selected;
the second obtaining subunit is configured to convert the fourth color value to be selected from the HSB color mode to the Lab color mode, then increase the brightness value in the Lab color mode, and convert the brightness value back to the HSB color mode to obtain a second color value to be selected.
6. The apparatus according to claim 5, wherein the first determining unit includes:
the adjustment subunit is used for reducing the first saturation value according to the association relation between the enterprise identification theme color value and the application program theme color value to obtain at least one second saturation value, and improving the first brightness value to obtain at least one second brightness value;
And the first acquisition subunit is used for combining each fourth hue value, each second saturation value and each second brightness value to obtain a plurality of first color values to be selected.
7. The apparatus according to claim 5, wherein the adjusting unit comprises:
the judging subunit is used for judging whether the ratio of the brightness value in the second color value to be selected to the brightness value in the background color accords with a first preset condition;
a determining subunit, configured to determine, when a ratio of a brightness value in the second color value to be selected to a brightness value in a background color meets a first preset condition, the second color value to be selected as a third color value to be selected;
and the third acquisition subunit is used for acquiring a third color value to be selected after adjusting the brightness value of the second color value to be selected when the ratio of the brightness value in the second color value to be selected to the brightness value in the background color does not accord with the first preset condition.
8. The apparatus according to claim 7, wherein the third obtaining subunit is specifically configured to obtain at least one third candidate color value corresponding to each second candidate color value, with the objective that the ratio of the brightness value of the adjusted second candidate color value to the brightness value of the background color meets the first preset condition, when the ratio of the brightness value of the second candidate color value to the brightness value of the background color does not meet the first preset condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010907011.3A CN112015417B (en) | 2020-09-01 | 2020-09-01 | Method and device for determining theme colors of application programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010907011.3A CN112015417B (en) | 2020-09-01 | 2020-09-01 | Method and device for determining theme colors of application programs |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112015417A CN112015417A (en) | 2020-12-01 |
CN112015417B true CN112015417B (en) | 2023-08-08 |
Family
ID=73517187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010907011.3A Active CN112015417B (en) | 2020-09-01 | 2020-09-01 | Method and device for determining theme colors of application programs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112015417B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113742025B (en) * | 2021-09-17 | 2024-07-09 | 北京字跳网络技术有限公司 | Page generation method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106934760A (en) * | 2016-12-08 | 2017-07-07 | 大连民族大学 | A kind of high-spectral data color visualization method towards classification |
CN108701351A (en) * | 2016-10-17 | 2018-10-23 | 华为技术有限公司 | A kind of image shows Enhancement Method and device |
CN109166159A (en) * | 2018-10-12 | 2019-01-08 | 腾讯科技(深圳)有限公司 | Obtain the method, apparatus and terminal of the dominant hue of image |
CN109783178A (en) * | 2019-01-24 | 2019-05-21 | 北京字节跳动网络技术有限公司 | A kind of color adjustment method of interface assembly, device, equipment and medium |
CN110377860A (en) * | 2019-07-18 | 2019-10-25 | 百度(中国)有限公司 | A kind of page color method of adjustment, device and electronic equipment |
-
2020
- 2020-09-01 CN CN202010907011.3A patent/CN112015417B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108701351A (en) * | 2016-10-17 | 2018-10-23 | 华为技术有限公司 | A kind of image shows Enhancement Method and device |
CN106934760A (en) * | 2016-12-08 | 2017-07-07 | 大连民族大学 | A kind of high-spectral data color visualization method towards classification |
CN109166159A (en) * | 2018-10-12 | 2019-01-08 | 腾讯科技(深圳)有限公司 | Obtain the method, apparatus and terminal of the dominant hue of image |
CN109783178A (en) * | 2019-01-24 | 2019-05-21 | 北京字节跳动网络技术有限公司 | A kind of color adjustment method of interface assembly, device, equipment and medium |
CN110377860A (en) * | 2019-07-18 | 2019-10-25 | 百度(中国)有限公司 | A kind of page color method of adjustment, device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112015417A (en) | 2020-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Rizzi et al. | From retinex to automatic color equalization: issues in developing a new algorithm for unsupervised color equalization | |
RU2693303C2 (en) | Method and device for changing background colour of tool panel according to dominant colour of image | |
US8594420B2 (en) | Color naming, color categorization and describing color composition of images | |
Hunziker et al. | Potential impacts of changing agricultural activities on scenic beauty–a prototypical technique for automated rapid assessment | |
JP2022528128A (en) | Skin quality measurement method, skin quality classification method, skin quality measurement device, electronic device and storage medium | |
US20070100786A1 (en) | Lexical classification system with dynamic modifiers | |
US20200089399A1 (en) | Color and texture match ratings for optimal match selection | |
Khan et al. | Image contrast enhancement using normalized histogram equalization | |
KR101774412B1 (en) | Make-up Color Diagnosis Method Customized by Skin color and Make-up Color Diagnosis Device Customized by Skin color | |
CN102647542B (en) | Image processing device and image processing method | |
CN112015417B (en) | Method and device for determining theme colors of application programs | |
CN111080722B (en) | Color migration method and system based on significance detection | |
Mojsilovic | A method for color naming and description of color composition in images | |
Huang et al. | Color harmony in two‐piece garments | |
Krasula et al. | Influence of HDR reference on observers preference in tone-mapped images evaluation | |
Gong et al. | Investigation of perceptual attributes for mobile display image quality | |
Charoensawan et al. | Comparison of fabric color naming using rgb and hsv color models | |
RU2333613C1 (en) | Method of artwork verification with view to authorship | |
Akyüz et al. | A proposed methodology for evaluating hdr false color maps | |
Baek et al. | Determination of the perceived contrast compensation ratio for a wide range of surround luminance | |
Kim et al. | No-reference contrast measurement for color images based on visual stimulus | |
KR101895390B1 (en) | Apparatus and method for evaluating contrast of image | |
JP2009003581A (en) | Image storage-retrieval system and program therefor | |
Krasula et al. | Rendering of HDR content on LDR displays: An objective approach | |
Liu | [Retracted] Color Image Landscape Photo Hand‐Painted Effect Evaluation with PFA Algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |