CN113760418A - Application interface processing method and device - Google Patents

Application interface processing method and device Download PDF

Info

Publication number
CN113760418A
CN113760418A CN202010641861.3A CN202010641861A CN113760418A CN 113760418 A CN113760418 A CN 113760418A CN 202010641861 A CN202010641861 A CN 202010641861A CN 113760418 A CN113760418 A CN 113760418A
Authority
CN
China
Prior art keywords
color
text
interface
target
font
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.)
Pending
Application number
CN202010641861.3A
Other languages
Chinese (zh)
Inventor
高明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010641861.3A priority Critical patent/CN113760418A/en
Publication of CN113760418A publication Critical patent/CN113760418A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an interface processing method and device of an application program, and relates to the technical field of computers. One embodiment of the method comprises: judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme; judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text; and performing saturation enhancement processing on the image on the interface. The implementation method can solve the technical problem that color matching is not friendly to color blind users.

Description

Application interface processing method and device
Technical Field
The invention relates to the technical field of computers, in particular to an interface processing method and device for an application program.
Background
With the development of information technology and the popularization of the internet, people have great changes in work and life, and more disabled people use the internet, including online shopping, learning and the like, and can provide better experiences through auxiliary functions, namely, aside and screen reading. However, over 8% of men and 0.4% of women in the world suffer from the problem of color vision disorders, which have difficulty in identifying some or all of the colors, and we generally refer to this group as "color blindness".
In the face of such a large audience, we should also be concerned about their needs. However, in the current popular application programs, certain aesthetic feeling is lacked for the part of people, even certain inconvenience and puzzlement are brought, and the experience of the people is greatly influenced.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1) color blindness user groups are not considered in most color matching on the page;
2) for an incorrect or striking reminder, the reminder is mostly in a red font or a green font, which causes color blindness and other color confusion for users;
3) color elements of low saturation occupy a large portion of the page elements, but color blind users are more difficult to recognize for such colors.
Disclosure of Invention
In view of this, embodiments of the present invention provide an interface processing method and apparatus for an application program, so as to solve the technical problem that color matching is not friendly to color-blind users.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an interface processing method for an application program, including:
judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme;
judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text;
and performing saturation enhancement processing on the image on the interface.
Optionally, judging whether the font color of the text on the interface is the target color; if yes, replacing the font color of the text based on a safe color matching scheme, wherein the replacing comprises the following steps:
judging whether the color attribute of the text on the interface is a fixed value;
if so, continuously judging whether the font color of the text is the target color;
if so, replacing the font color of the text based on a safe color matching scheme;
if not, acquiring the current font color of the text from the server side, and continuously judging whether the current font color of the text is the target color;
and if so, replacing the current font color of the text based on the safe color matching scheme.
Optionally, replacing the font color of the text based on a safe color scheme includes:
converting the font color of the text from an RGB color mode to an HSB color mode or an HSL color mode;
replacing font colors of the text converted into the HSB color mode or the HSL color mode based on a safe color scheme.
Optionally, the target text comprises text for indicating an error, an exception or a reminder, or link information;
adding a warning icon on the interface, including:
and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text.
Optionally, performing word processing on the target text, including:
adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or the presence of a gas in the gas,
and carrying out thickening processing on the target text.
Optionally, performing saturation enhancement processing on the image on the interface, including:
acquiring adjustment parameters corresponding to each image on the interface from a server;
and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image.
Optionally, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image, including:
normalizing the adjustment parameters corresponding to the images;
for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value;
if the difference is equal to zero, not processing;
if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
In addition, according to another aspect of the embodiments of the present invention, there is provided an interface processing apparatus for an application program, including:
the replacing module is used for judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme;
the processing module is used for judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text;
and the enhancement module is used for carrying out saturation enhancement processing on the image on the interface.
Optionally, the replacement module is further configured to:
judging whether the color attribute of the text on the interface is a fixed value;
if so, continuously judging whether the font color of the text is the target color;
if so, replacing the font color of the text based on a safe color matching scheme;
if not, acquiring the current font color of the text from the server side, and continuously judging whether the current font color of the text is the target color;
and if so, replacing the current font color of the text based on the safe color matching scheme.
Optionally, the replacement module is further configured to:
converting the font color of the text from an RGB color mode to an HSB color mode or an HSL color mode;
replacing font colors of the text converted into the HSB color mode or the HSL color mode based on a safe color scheme.
Optionally, the target text comprises text for indicating an error, an exception or a reminder, or link information;
the processing module is further configured to:
and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text.
Optionally, the processing module is further configured to:
adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or the presence of a gas in the gas,
and carrying out thickening processing on the target text.
Optionally, the enhancement module is further configured to:
acquiring adjustment parameters corresponding to each image on the interface from a server;
and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image.
Optionally, the enhancement module is further configured to:
normalizing the adjustment parameters corresponding to the images;
for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value;
if the difference is equal to zero, not processing;
if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: because the technical means of replacing the font color of the text based on the safe color matching scheme, adding the warning icon on the interface and/or performing word processing on the target text and performing saturation enhancement processing on the image on the interface is adopted, the technical problem that color matching is not friendly to color blind users in the prior art is solved. The embodiment of the invention is based on a safe color matching scheme, replaces the target color by the color with higher color-blindness user identifiability, adds the identifiable warning icon aiming at the target text, and further performs saturation enhancement processing aiming at the image with low saturation so as to improve the color identification degree of the color-blindness user. The embodiment of the invention adopts a mode of combining various elements to specifically present the image-text information on the application page, and can prevent the color blindness user from completely depending on color distinguishing information.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of an interface processing method of an application according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of colors that are easily confused by anerythrochloropsia;
FIG. 3 is a schematic diagram of adding an alert icon on an interface according to an embodiment of the present invention;
FIG. 4 is a diagram showing a main flow of an interface processing method of an application program according to a referential embodiment of the present invention;
fig. 5 is a schematic diagram of main modules of an interface processing apparatus of an application according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of an interface processing method of an application according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 1, the method for processing an interface of an application program is applied to a client, and may include:
step 101, judging whether the font color of the text on the interface is the target color; if yes, go to step 102; if not, go to step 103.
In an embodiment of the invention, the target color is determined according to the color blind population. Achromatopsia can be divided into: haemato-blindness (P), green-blindness (D), blue-blindness (T) and total-color-blindness. Among them, the red blindness and the green blindness are the most common, and they are called red-green blindness. The color perception of the achromatopsia and the achromatopsia is approximate, and the number of the achromatopsia accounts for 99 percent of the total number of the achromatopsia, so that people need to understand more colors which can be seen by the achromatopsia. Fig. 2 lists colors that are easily confused by anerythrochloropsia, which cannot distinguish between red and green, viewed as two tones: the long wave (red, orange, yellow, green) part is yellow, and the short wave (cyan, blue, violet) part is blue. Alternatively, the target color may be red, orange, yellow, green, cyan, blue, violet.
Optionally, before step 101, first determining whether an adapter switch of the client is turned on, if yes, executing step 101; if not, the process is ended.
And 102, replacing the font color of the text based on the safe color matching scheme.
The client side stores a safe color matching scheme in advance, so that after the font color of the text on the interface is judged to be the target color, the font color of the text is replaced based on the safe color matching scheme. It should be noted that the partial color values listed in the security color scheme are an unobstructed color suggestion, are not fixed colors, and may be self-perfecting, filling. Optionally, the client obtains the latest safe color matching scheme from the server at intervals to maintain the local color value of the client, enrich the color matching scheme, and ensure that the color matching scheme is color blind user-friendly.
Optionally, step 102 may comprise: converting the font color of the text from an RGB color mode to an HSB color mode or an HSL color mode; replacing font colors of the text converted into the HSB color mode or the HSL color mode based on a safe color scheme. Taking red as an example, the RGB color mode may be converted into an HSB color mode or an HSL color mode, and whether the converted color satisfies the definition of red is determined, and if yes, the safe color matching replacement may be performed. The RGB color mode is converted into the HSB color mode or the HSL color mode, so that the division of the color gamut is more obvious, and an accurate formula scheme is matched.
For example, the client monitors that the font color of the text on the interface is the target color: red (# FF2D19) corresponding to RGB 255, 45, 26; corresponding to HSB 5, 90, 100; the font color of the text is automatically replaced based on the safe color scheme.
Alternatively, steps 101 and 102 may include the steps of:
judging whether the color attribute of the text on the interface is a fixed value;
if so, continuously judging whether the font color of the text is the target color;
if so, replacing the font color of the text based on a safe color matching scheme;
if not, acquiring the current font color of the text from the server side, and continuously judging whether the current font color of the text is the target color;
and if so, replacing the current font color of the text based on the safe color matching scheme.
At the beginning of application program design, the color attributes of some texts are fixed values, such as product titles, product prices, product function introductions and the like; the color attribute of some texts is a dynamic value, and the latest font color needs to be acquired from the server in real time. For the two different situations, the embodiment of the invention firstly judges whether the color attribute of the text is a fixed value, if so, continuously judges whether the font color of the text is the target color, and if so, replaces the font color of the text based on the safe color matching scheme. And if the color attribute of the text is a dynamic value, calling an interface to obtain the current font color of the text from a server, continuously judging whether the current font color of the text is the target color, and if so, replacing the font color of the text based on a safe color matching scheme. This ensures that the text on the interface that appears as the target color is replaced with a color that is user-friendly to color blindness.
Optionally, in another embodiment of the present invention, the client may also transmit a message that the color matching switch is turned on to the server when the interface is called, so that the server determines whether the current font color of the text is the target color, and if the current font color is the target color, the font color of the text is replaced based on the safe color matching scheme. And then, the server side issues the replaced color to the client side. That is, if the color attribute of the text is a dynamic value, the server may perform color replacement again, issue the replaced color to the client, and render the color on the interface directly after the client receives the replaced color without performing the steps of color judgment and color replacement.
103, judging whether a target text exists on the interface; if yes, go to step 104; if not, go to step 105.
To effectively alert color blind users, target text may be preconfigured, including text indicating errors, anomalies, or alerts, or link information. For example, the target text may be incorrect password, account name not existing, incomplete information filling, or link information accessible by the user.
It should be noted that the target text may be configured according to the needs of the application, and the embodiment of the present invention is not limited to this.
And 104, adding a warning icon on the interface, and/or performing word processing on the target text.
For color blind users, many colors look almost like and there are cases where they look as another color, so the psychology of color-psychology of color change theory is not suitable for this. For example, text indicating errors, anomalies, or reminders is typically designed to be red, but color blind users may perceive red as coffee, which defeats the purpose of the alert.
In order to solve the problem, in the step, if the target text exists on the interface, a warning icon is added on the interface, and/or the target text is subjected to word processing so as to achieve the effect of reminding the color blindness user. On the basis of color replacement, the embodiment of the invention adds the warning icon or performs word processing on the target text on the interface, further optimizes the embodiment on pure color, avoids completely depending on color to distinguish information, and ensures that the color blind user is more friendly.
Optionally, adding a warning icon on the interface, including: and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text. As shown in fig. 3, if there is a target text on the interface, a warning icon is added on the interface and near the target text, such as: "! The warning icon of "warning icon," the warning icon of "x," the warning icon of "□" or the warning icon of loudspeaker shape etc. to provide more direct visual experience, reduce the puzzlement of achromatopsia user different degree. The embodiment of the invention clearly shows important information by simultaneously using the characters and the icons.
Optionally, performing word processing on the target text, including: adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or, performing thickening processing on the target text. In another embodiment of the invention, in addition to adding the warning icon on the interface, the target text may also be processed, an underline is added under the target text, and the color of the underline is selected from colors in a safe color scheme, which is helpful for reminding the color blind user to pay attention to the target text; or, the target text can be subjected to thickening processing, so that the font of the target text is obviously thicker than that of the non-target text on the interface, and the color blindness user can be reminded to pay attention to the target text.
For example, for the link information in the text, besides the color which is easily distinguished by the color blind user, a corresponding graphic, a chart, an underline or the like may be added, so as to remind the user that there is accessible link information.
And 105, performing saturation enhancement processing on the image on the interface.
In the conventional design of application programs, low saturation color matching is increasingly adopted. The color saturation depends on the ratio of the color component and the achromatic component (gray) contained in the color. The larger the color content, the greater the saturation; the larger the achromatic component is, the smaller the saturation is. However, color blind users have poor color discrimination, and can only see colors when the colors are relatively saturated. In order to solve this problem, the embodiment of the present invention further performs saturation enhancement processing on the image on the interface, so that the color blindness user can improve the discrimination capability of the color.
Optionally, step 105 may comprise: acquiring adjustment parameters corresponding to each image on the interface from a server; and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image. In the embodiment of the invention, the interface of the application program can be dynamically adjusted by the saturation enhancement algorithm, and the adjustment parameter (percentage) can be dynamically controlled by the server side. For example, each image is provided with a single parameter to be adjusted independently; and the adjustment parameters can be unfixed and can be configured at the server side according to the needs. Optionally, a saturation threshold may be configured in advance, and when the client monitors that the saturation of the image is lower than the saturation threshold, the client triggers to execute step 105.
Optionally, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image, including: normalizing the adjustment parameters corresponding to the images; for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value; if the difference is equal to zero, not processing; if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
The original value range of the adjustment parameter is [ -100,100], and after normalization, the value is [ -1,1], and is marked as percent. For each pixel, the following operations are performed:
rgbMax=max(max(R,G)B (1)
rgbMix=mix(mix(R,G)B) (2)
delta=(rgbMax-rgbMix)/255 (3)
if delta is 0, no adjustment is made. And continuing to judge and operate the next pixel. If delta >0
value=(rgbMax-rgbMix)/255 (4)
L in HSL is:
L=value/2 (5)
the saturation S is:
S=delta/value L<0.5
S=delta/(2-value) L≥0.5 (6)
1) if percent > is 0, first alpha is determined,
alpha=S ercent+S>=1
alpha=1-percent else (7)
alpha=1/alpha-1 (8)
RGB’=RGB+(RGB-L×255)×alpha (9)
2) if percent <0, alpha ═ percent
RGB’=L×255+(RGB-L×255)×(1+alpha) (10)
The client can adjust the saturation degree aiming at the image, and an adjusting parameter (percent) can be fixed to a certain specific threshold value and can also be issued by the server so as to carry out interface color adaptation aiming at the achromatopsia user.
According to the various embodiments, it can be seen that the technical means of the embodiment of the invention, which replaces the font color of the text based on the safe color matching scheme, adds the warning icon on the interface and/or performs the word processing on the target text, and performs the saturation enhancement processing on the image on the interface, solves the technical problem that the color matching is not friendly to the color blind user in the prior art. The embodiment of the invention is based on a safe color matching scheme, replaces the target color by the color with higher color-blindness user identifiability, adds the identifiable warning icon aiming at the target text, and further performs saturation enhancement processing aiming at the image with low saturation so as to improve the color identification degree of the color-blindness user. The embodiment of the invention adopts a mode of combining various elements to specifically present the image-text information on the application page, and can prevent the color blindness user from completely depending on color distinguishing information.
Fig. 4 is a schematic diagram of a main flow of an interface processing method of an application according to a referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 4, the method for processing an interface of an application program, applied to a client, may include:
step 401, judging whether the color attribute of the text on the interface is a fixed value; if yes, go to step 402; if not, go to step 403.
Step 402, judging whether the font color of the text is a target color; if yes, go to step 404; if not, go to step 406.
Step 403, obtaining the current font color of the text from the server, and judging whether the current font color of the text is the target color; if yes, go to step 405; if not, go to step 406.
At the beginning of application program design, the color attributes of some texts are fixed values, such as product titles, product prices, product function introductions and the like; the color attribute of some texts is a dynamic value, and the latest font color needs to be acquired from the server in real time.
And 404, replacing the font color of the text based on the safe color matching scheme.
And 405, replacing the current font color of the text based on the safe color matching scheme.
For the two different situations, the embodiment of the invention firstly judges whether the color attribute of the text is a fixed value, if so, continuously judges whether the font color of the text is the target color, and if so, replaces the font color of the text based on the safe color matching scheme. And if the color attribute of the text is a dynamic value, calling an interface to obtain the current font color of the text from a server, continuously judging whether the current font color of the text is the target color, and if so, replacing the font color of the text based on a safe color matching scheme. This ensures that the text on the interface that appears as the target color is replaced with a color that is user-friendly to color blindness.
Step 406, judging whether a target text exists on the interface; if yes, go to step 407; if not, go to step 408.
Target text may be preconfigured, including text indicating errors, exceptions, or reminders, or link information. For example, the target text may be incorrect password, account name not existing, incomplete information filling, or link information accessible by the user.
Step 407, adding a warning icon on the interface, and/or performing word processing on the target text.
On the basis of color replacement, the embodiment of the invention adds the warning icon or performs word processing on the target text on the interface, further optimizes the embodiment on pure color, avoids completely depending on color to distinguish information, and ensures that the color blind user is more friendly.
Optionally, adding a warning icon on the interface, including: and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text. Optionally, performing word processing on the target text, including: adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or, performing thickening processing on the target text.
In addition to adding the warning icon on the interface, the target text can also be processed, an underline is added under the target text, and the color of the underline is selected from colors in a safe color scheme, so that a color blindness user can be reminded to pay attention to the target text; or, the target text can be subjected to thickening processing, so that the font of the target text is obviously thicker than that of the non-target text on the interface, and the color blindness user can be reminded to pay attention to the target text.
And step 408, performing saturation enhancement processing on the image on the interface.
Specifically, obtaining adjustment parameters corresponding to each image on the interface from a server; and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image. In the embodiment of the invention, the interface of the application program can be dynamically adjusted by the saturation enhancement algorithm, and the adjustment parameter (percentage) can be dynamically controlled by the server side. For example, each image is provided with a single parameter to be adjusted independently; and the adjustment parameters can be unfixed and can be configured at the server side according to the needs.
Optionally, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image, including: normalizing the adjustment parameters corresponding to the images; for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value; if the difference is equal to zero, not processing; if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
In addition, in a reference embodiment of the present invention, the detailed implementation of the interface processing method of the application program is already described in detail in the above interface processing method of the application program, and therefore, the repeated content is not described again.
Fig. 5 is a schematic diagram of main modules of an interface processing apparatus of an application according to an embodiment of the present invention, and as shown in fig. 5, the interface processing apparatus 500 of the application includes a replacement module 501, a processing module 502, and an enhancement module 503; the replacing module 501 is configured to determine whether a font color of a text on the interface is a target color; if so, replacing the font color of the text based on a safe color matching scheme; the processing module 502 is configured to determine whether a target text exists on the interface; if yes, adding a warning icon on the interface, and/or performing word processing on the target text; the enhancing module 503 is configured to perform saturation enhancement processing on the image on the interface.
Optionally, the replacing module 501 is further configured to:
judging whether the color attribute of the text on the interface is a fixed value;
if so, continuously judging whether the font color of the text is the target color;
if so, replacing the font color of the text based on a safe color matching scheme;
if not, acquiring the current font color of the text from the server side, and continuously judging whether the current font color of the text is the target color;
and if so, replacing the current font color of the text based on the safe color matching scheme.
Optionally, the replacing module 501 is further configured to:
converting the font color of the text from an RGB color mode to an HSB color mode or an HSL color mode;
replacing font colors of the text converted into the HSB color mode or the HSL color mode based on a safe color scheme.
Optionally, the target text comprises text for indicating an error, an exception or a reminder, or link information;
the processing module 502 is further configured to:
and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text.
Optionally, the processing module 502 is further configured to:
adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or the presence of a gas in the gas,
and carrying out thickening processing on the target text.
Optionally, the enhancing module 503 is further configured to:
acquiring adjustment parameters corresponding to each image on the interface from a server;
and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image.
Optionally, the enhancing module 503 is further configured to:
normalizing the adjustment parameters corresponding to the images;
for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value;
if the difference is equal to zero, not processing;
if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
According to the various embodiments, it can be seen that the technical means of the embodiment of the invention, which replaces the font color of the text based on the safe color matching scheme, adds the warning icon on the interface and/or performs the word processing on the target text, and performs the saturation enhancement processing on the image on the interface, solves the technical problem that the color matching is not friendly to the color blind user in the prior art. The embodiment of the invention is based on a safe color matching scheme, replaces the target color by the color with higher color-blindness user identifiability, adds the identifiable warning icon aiming at the target text, and further performs saturation enhancement processing aiming at the image with low saturation so as to improve the color identification degree of the color-blindness user. The embodiment of the invention adopts a mode of combining various elements to specifically present the image-text information on the application page, and can prevent the color blindness user from completely depending on color distinguishing information.
The specific implementation of the interface processing device for the application program according to the present invention has been described in detail in the above interface processing method for the application program, and therefore, the repeated description is omitted here.
Fig. 6 shows an exemplary system architecture 600 of an interface processing method of an application or an interface processing apparatus of an application to which the embodiment of the present invention can be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The background management server may analyze and otherwise process the received data such as the item information query request, and feed back a processing result (for example, target push information, item information — just an example) to the terminal device.
It should be noted that the interface processing method of the application provided in the embodiment of the present invention may be executed by the terminal devices 601, 602, and 603, and accordingly, the interface processing apparatus of the application may be disposed in the terminal devices 601, 602, and 603.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a replacement module, a processing module, and an enhancement module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme; judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text; and performing saturation enhancement processing on the image on the interface.
According to the technical scheme of the embodiment of the invention, as the technical means of replacing the font color of the text based on the safe color matching scheme, adding the warning icon on the interface and/or performing word processing on the target text and performing saturation enhancement processing on the image on the interface is adopted, the technical problem that color matching is not friendly to color blind users in the prior art is solved. The embodiment of the invention is based on a safe color matching scheme, replaces the target color by the color with higher color-blindness user identifiability, adds the identifiable warning icon aiming at the target text, and further performs saturation enhancement processing aiming at the image with low saturation so as to improve the color identification degree of the color-blindness user. The embodiment of the invention adopts a mode of combining various elements to specifically present the image-text information on the application page, and can prevent the color blindness user from completely depending on color distinguishing information.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An interface processing method of an application program is characterized by comprising the following steps:
judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme;
judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text;
and performing saturation enhancement processing on the image on the interface.
2. The method of claim 1, wherein determining whether a font color of text on the interface is a target color; if yes, replacing the font color of the text based on a safe color matching scheme, wherein the replacing comprises the following steps:
judging whether the color attribute of the text on the interface is a fixed value;
if so, continuously judging whether the font color of the text is the target color;
if so, replacing the font color of the text based on a safe color matching scheme;
if not, acquiring the current font color of the text from the server side, and continuously judging whether the current font color of the text is the target color;
and if so, replacing the current font color of the text based on the safe color matching scheme.
3. The method of claim 1 or 2, wherein replacing font colors of the text based on a safe color scheme comprises:
converting the font color of the text from an RGB color mode to an HSB color mode or an HSL color mode;
replacing font colors of the text converted into the HSB color mode or the HSL color mode based on a safe color scheme.
4. The method of claim 1, wherein the target text comprises text indicating an error, anomaly, or reminder, or link information;
adding a warning icon on the interface, including:
and adding a warning icon on the interface and at a position close to the target text, wherein the color of the warning icon is selected from colors in a safe color scheme, and the meaning indicated by the warning icon is the same as that indicated by the target text.
5. The method of claim 4, wherein word processing the target text comprises:
adding an underline under the target text, wherein the color of the underline is selected from colors in a safe color scheme; and/or the presence of a gas in the gas,
and carrying out thickening processing on the target text.
6. The method of claim 1, wherein performing saturation enhancement processing on the image on the interface comprises:
acquiring adjustment parameters corresponding to each image on the interface from a server;
and for each image, performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image.
7. The method according to claim 6, wherein performing saturation enhancement processing on the image based on the adjustment parameter corresponding to the image comprises:
normalizing the adjustment parameters corresponding to the images;
for each pixel point in the image: calculating the maximum value and the minimum value in the R channel, the G channel and the B channel, subtracting the maximum value and the minimum value, and dividing by 255 to obtain a difference value;
if the difference is equal to zero, not processing;
if the difference is larger than zero, calculating saturation according to the maximum value and the minimum value, and then respectively calculating channel values of an R channel, a G channel and a B channel based on the adjustment parameters and the saturation after normalization processing.
8. An interface processing apparatus for an application program, comprising:
the replacing module is used for judging whether the font color of the text on the interface is the target color; if so, replacing the font color of the text based on a safe color matching scheme;
the processing module is used for judging whether a target text exists on the interface or not; if yes, adding a warning icon on the interface, and/or performing word processing on the target text;
and the enhancement module is used for carrying out saturation enhancement processing on the image on the interface.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, implement the method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010641861.3A 2020-07-06 2020-07-06 Application interface processing method and device Pending CN113760418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010641861.3A CN113760418A (en) 2020-07-06 2020-07-06 Application interface processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010641861.3A CN113760418A (en) 2020-07-06 2020-07-06 Application interface processing method and device

Publications (1)

Publication Number Publication Date
CN113760418A true CN113760418A (en) 2021-12-07

Family

ID=78785515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010641861.3A Pending CN113760418A (en) 2020-07-06 2020-07-06 Application interface processing method and device

Country Status (1)

Country Link
CN (1) CN113760418A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115220627A (en) * 2022-07-19 2022-10-21 平安银行股份有限公司 Method and computer equipment for displaying colors of user-defined financial fund products
CN115291917A (en) * 2022-09-29 2022-11-04 天津大学 Method for repairing color universality problem in app

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110145742A1 (en) * 2004-06-22 2011-06-16 Imran Chaudhri Color labeling in a graphical user interface
CN103098113A (en) * 2010-09-21 2013-05-08 索尼公司 Text-to-touch techniques
CN103870148A (en) * 2012-12-18 2014-06-18 中兴通讯股份有限公司 Mobile terminal and method for displaying interface thereof
CN105047068A (en) * 2015-09-07 2015-11-11 武汉大学 Tourist map generation method and tourist map generation system taking into consideration visual features of people with red-green color blindness
CN105718283A (en) * 2016-01-14 2016-06-29 广东小天才科技有限公司 Method and apparatus for designing color of display interface of application
CN106155483A (en) * 2016-06-30 2016-11-23 乐视控股(北京)有限公司 Display packing and terminal
CN107694092A (en) * 2016-08-09 2018-02-16 电子技术公司 System and method for the automated graphics processing of the image with similar luminosity
CN110377390A (en) * 2019-07-17 2019-10-25 Oppo广东移动通信有限公司 Image information processing method, device and electronic equipment
CN110634169A (en) * 2019-01-08 2019-12-31 华为技术有限公司 Image processing apparatus and method
CN110908765A (en) * 2019-11-29 2020-03-24 五八有限公司 Interface display method and device, terminal equipment and storage medium
CN111275777A (en) * 2018-12-04 2020-06-12 北京京东尚科信息技术有限公司 Automatic color matching method, device, medium and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110145742A1 (en) * 2004-06-22 2011-06-16 Imran Chaudhri Color labeling in a graphical user interface
CN103098113A (en) * 2010-09-21 2013-05-08 索尼公司 Text-to-touch techniques
CN103870148A (en) * 2012-12-18 2014-06-18 中兴通讯股份有限公司 Mobile terminal and method for displaying interface thereof
CN105047068A (en) * 2015-09-07 2015-11-11 武汉大学 Tourist map generation method and tourist map generation system taking into consideration visual features of people with red-green color blindness
CN105718283A (en) * 2016-01-14 2016-06-29 广东小天才科技有限公司 Method and apparatus for designing color of display interface of application
CN106155483A (en) * 2016-06-30 2016-11-23 乐视控股(北京)有限公司 Display packing and terminal
CN107694092A (en) * 2016-08-09 2018-02-16 电子技术公司 System and method for the automated graphics processing of the image with similar luminosity
CN111275777A (en) * 2018-12-04 2020-06-12 北京京东尚科信息技术有限公司 Automatic color matching method, device, medium and electronic equipment
CN110634169A (en) * 2019-01-08 2019-12-31 华为技术有限公司 Image processing apparatus and method
CN110377390A (en) * 2019-07-17 2019-10-25 Oppo广东移动通信有限公司 Image information processing method, device and electronic equipment
CN110908765A (en) * 2019-11-29 2020-03-24 五八有限公司 Interface display method and device, terminal equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱健文;: "界面设计中针对色盲人群的色彩选择方式研究", 广西轻工业, no. 05, 15 May 2008 (2008-05-15), pages 1 - 2 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115220627A (en) * 2022-07-19 2022-10-21 平安银行股份有限公司 Method and computer equipment for displaying colors of user-defined financial fund products
CN115291917A (en) * 2022-09-29 2022-11-04 天津大学 Method for repairing color universality problem in app
CN115291917B (en) * 2022-09-29 2023-01-06 天津大学 Method for repairing color universality problem in app

Similar Documents

Publication Publication Date Title
CN110262715B (en) Information processing method and device, computer readable storage medium and electronic equipment
US10467776B2 (en) Information processing method and apparatus, terminal, and storage medium
US20110305386A1 (en) Color Indication Tool for Colorblindness
CN113760418A (en) Application interface processing method and device
CN116541884A (en) Selective obfuscation of notifications
US20180301139A1 (en) Social Networking with Assistive Technology Device
CN108989185A (en) Message treatment method, device, electronic equipment and computer-readable medium
US20160062603A1 (en) Systems and methods for self-learning dynamic interfaces
CN113032076B (en) Display method, display device, computer equipment and storage medium
EP4099162A1 (en) Method and apparatus for configuring theme color of terminal device, and terminal device
EP2555127A2 (en) Display apparatus for translating conversations
US10176334B2 (en) Data security using alternative encoding
CN109656647B (en) Chart picture generation method, device and equipment and computer readable storage medium
WO2020011066A1 (en) Terminal display method and device, terminal and readable medium
US10361976B2 (en) Application based display layout system and method
CN104714799A (en) Method and system for creating dynamic display overlay
EP3766233B1 (en) Methods and systems for enabling a digital assistant to generate an ambient aware response
CN110650082B (en) Time display method and device, computer readable medium and electronic equipment
CN113051477A (en) Content recommendation method and device, electronic equipment and medium
KR101979667B1 (en) Automatic contrast adjustment system and Method thereof
CN113112472A (en) Image processing method and device
CN113763256A (en) Picture adaptation method and device
CN110662185B (en) Sending method and device of chart short message and terminal equipment
CN114089994A (en) Method and device for adjusting text color
CN115113783A (en) Message processing method, device, equipment and readable storage medium

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