CN107704253B - Control character color transformation method and system and electronic device - Google Patents

Control character color transformation method and system and electronic device Download PDF

Info

Publication number
CN107704253B
CN107704253B CN201710490394.7A CN201710490394A CN107704253B CN 107704253 B CN107704253 B CN 107704253B CN 201710490394 A CN201710490394 A CN 201710490394A CN 107704253 B CN107704253 B CN 107704253B
Authority
CN
China
Prior art keywords
control
background picture
text
color value
character
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
Application number
CN201710490394.7A
Other languages
Chinese (zh)
Other versions
CN107704253A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710490394.7A priority Critical patent/CN107704253B/en
Priority to PCT/CN2017/108779 priority patent/WO2019000746A1/en
Publication of CN107704253A publication Critical patent/CN107704253A/en
Application granted granted Critical
Publication of CN107704253B publication Critical patent/CN107704253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a character color transformation method of a control. The method comprises the following steps: after an application program is operated online and/or a text background picture of a text control with the application program is changed, acquiring a configuration file of the application program; identifying the character controls contained in the application program according to the configuration file, and determining the view controls of the superior nodes of each character control according to the control structure tree of the character controls; and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the obvious color value corresponding to the background picture corresponding to the view control. The method and the device can prevent the user from not seeing the text content of the text control clearly under the condition that the color of the text background picture of the text control is similar to the color of the text control, and can avoid the phenomenon that the text control cannot be operated or the occurrence of misoperation is reduced.

Description

Control character color transformation method and system and electronic device
Technical Field
The invention relates to the field of control display of application programs, in particular to a method and a system for changing the character color of a control and an electronic device.
Background
At present, after an application program (APP) is operated online, the color of a text corresponding to each text control of the APP is usually fixed, the color of a text background picture corresponding to the text control is not fixed, and when the color of the text background picture changes, the color of the text background picture of the text control is very similar to the color of a text of the text control.
Disclosure of Invention
The invention aims to provide a control character color conversion method, and aims to solve the problem that the user cannot clearly see the character content of the control at present, so that the character control cannot be operated or misoperation often occurs.
In order to achieve the above object, the present invention provides a method for converting text color of a control, the method comprising the following steps:
A. after an application program is operated online and/or a text background picture of a text control of the application program is changed, acquiring a configuration file of the application program, wherein the configuration file comprises a control structure tree of each control of the application program and attribute data of each control, the control structure tree comprises at least one control node branch, a main node of each control node branch corresponds to a first-layer control of the application program, and a control corresponding to a lower-layer node is a lower-layer control corresponding to a corresponding upper-layer node under each control node branch;
B. identifying the character controls contained in the application program according to the configuration file, and determining the view controls of the upper nodes of the character controls according to the control structure tree of the character controls;
C. and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the obvious color value corresponding to the background picture corresponding to the view control.
Preferably, step C comprises:
acquiring a background picture corresponding to the view control;
respectively counting the color values of all the pixel points in the background picture and the number of the pixel points corresponding to all the color values in the background picture;
and determining the significant color value corresponding to the background picture according to the statistical result, and correspondingly adjusting the character color value of each character control corresponding to the background picture according to the significant color value corresponding to the background picture.
Preferably, the step of determining the significant color value corresponding to the background picture according to the statistical result includes:
respectively comparing the number of pixel points corresponding to each color value in the background picture;
respectively finding out color values with the maximum number of corresponding pixel points in the background picture, if the color values with the maximum number of corresponding pixel points in one background picture are multiple, randomly selecting one found color value as a significant color value corresponding to the background picture, and if one color value with the maximum number of corresponding pixel points in one background picture is one, the found color value is the significant color value corresponding to the background picture.
Preferably, in order to improve the accuracy of adjusting the text color value of the text control, the step C is replaced by the following step:
acquiring a background picture corresponding to the view control, and determining a pixel area of each character control;
respectively determining a significant picture area corresponding to the pixel area of the corresponding character control in the background picture;
and determining the significant color values corresponding to the significant picture areas, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values of the significant picture areas.
Preferably, determining the saliency color values corresponding to the respective saliency picture regions comprises:
respectively counting the color values of all the pixel points in each significant picture area and respectively counting the number of the pixel points corresponding to all the color values in each significant picture area;
and determining the corresponding significant color value of each significant picture area according to the statistical result.
In order to achieve the above object, the present invention further provides an electronic device, which includes a memory, a processor, and a text color transformation system of a control stored in the memory and operable on the processor, wherein when executed by the processor, the text color transformation system of the control implements the following steps:
A. after an application program is operated online and/or a text background picture of a text control with the application program is changed, acquiring a configuration file of the application program, wherein the configuration file comprises a control structure tree of each control of the application program and attribute data of each control, the control structure tree comprises at least one control node branch, a main node of each control node branch corresponds to a first-layer control of the application program, and a control corresponding to a lower-layer node is a lower-layer control corresponding to a corresponding upper-layer node under each control node branch;
B. identifying the character controls contained in the application program according to the configuration file, and determining the view controls of the superior nodes of each character control according to the control structure tree of the character controls;
C. and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the obvious color value corresponding to the background picture corresponding to the view control.
Preferably, step C comprises:
acquiring a background picture corresponding to the view control;
respectively counting the color values of all the pixel points in the background picture and the number of the pixel points corresponding to all the color values in the background picture;
and determining the significant color value corresponding to the background picture according to the statistical result, and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the significant color value corresponding to the background picture.
Preferably, the step of determining the significant color value corresponding to the background picture according to the statistical result includes:
respectively comparing the number of pixel points corresponding to each color value in the background picture;
respectively finding out color values with the maximum number of corresponding pixel points in the background picture, if the color values with the maximum number of corresponding pixel points in one background picture are multiple, randomly selecting one found color value as a significant color value corresponding to the background picture, and if one color value with the maximum number of corresponding pixel points in one background picture is one, the found color value is the significant color value corresponding to the background picture.
Preferably, step C is replaced by the following steps:
acquiring a background picture corresponding to the view control, and determining a pixel area of each character control;
respectively determining salient picture areas corresponding to the pixel areas of the corresponding character controls in the background picture;
and determining the significant color values corresponding to the significant picture areas, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values of the significant picture areas.
To achieve the above object, the present invention further provides a computer-readable storage medium storing a project information presentation program, which is executable by at least one processor to cause the at least one processor to execute the steps of the text color transformation method for a control as described above.
The invention has the beneficial effects that: acquiring a configuration file of an application program after the application program is operated online and/or a text background picture of a text control of the application program is changed, identifying the text control contained in the application program in the configuration file, and determining a view control of a superior node of each text control according to a control structure tree in the configuration file; further acquiring background pictures corresponding to the view controls in the configuration file, respectively counting color values of pixel points in the background pictures and the number of the pixel points corresponding to the color values in the background pictures, determining the significant color values corresponding to the background pictures according to the statistical result, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values corresponding to the background pictures. Therefore, the user can see the text content of the control clearly, and the problem that the user cannot see the text content of the control clearly and cannot operate the text control or misoperation frequently occurs is solved.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of the present invention;
FIG. 2 is a detailed flowchart of step S3 shown in FIG. 1;
FIG. 3 is a detailed flowchart of step S31-3 shown in FIG. 2;
FIG. 4 is a detailed flow chart of step S3 shown in FIG. 1 in another embodiment of the present invention;
FIG. 5 is a detailed flowchart of step S32-3 shown in FIG. 4;
FIG. 6 is a schematic diagram of an operating environment of an embodiment of a data source based business customization system of the present invention;
FIG. 7 is a schematic structural diagram according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of the first color conversion module shown in FIG. 7;
fig. 9 is a schematic structural diagram of the control color value adjustment unit shown in fig. 8.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Please refer to fig. 1, which is a schematic diagram of an alternative hardware architecture of an electronic device 1 according to the present invention. In this embodiment, the electronic device 1 may include, but is not limited to, a memory 11, a processor 12, a network interface 13, and a display 14, which may be communicatively connected to each other through a system bus. It is noted that fig. 1 only shows the electronic device 1 with components 11-14, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic apparatus 1, such as a plug-in hard disk provided on the electronic apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the memory 11 may also comprise both an internal memory unit of the electronic apparatus 2 and an external memory device thereof. In this embodiment, the memory 11 is generally used for storing program codes of the operating system and various application software installed in the electronic device 1, such as the text color conversion system 10 of the control. Further, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the electronic device 1. In this embodiment, the processor 12 is configured to execute the program code stored in the memory 11 or process data, such as the text color conversion system 10 of the executed control.
The network interface 13 may comprise a wireless network interface or a wired network interface, and the network interface 13 is generally used for establishing communication connection between the electronic apparatus 1 and other electronic devices.
The display 14 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 14 is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
The application environment and the hardware structure and function of the related devices of the various embodiments of the present invention have been described in detail so far. Hereinafter, various embodiments of the present invention will be proposed based on the above-described application environment and related devices.
As shown in fig. 2, fig. 2 is a schematic flow chart according to an embodiment of the present invention, which includes the following steps:
and S1, acquiring the configuration file of the application program.
It can be understood that in an actual application, generally, after an application program is online run, a configuration file of the application program is obtained as needed, or after the application program is online run, if a text background picture of a text control of the application program is changed, the configuration file of the application program is obtained.
And S2, identifying the character controls contained in the application program according to the configuration file, and determining the view control of the superior node of each character control.
It should be noted that the configuration file in step S1 includes a control structure tree of each control of the application program and attribute data of each control, where the control structure tree includes at least one control node branch, a master node of each control node branch corresponds to a first-layer control of the application program, and a control corresponding to a lower-layer node under each control node branch is a lower-layer control corresponding to a higher-layer node.
For example, if the attribute data of a control includes a control literal name, the control display control system identifies the control as a literal control. In this embodiment, the attribute data of the control includes a pixel region of the control, a function of the control, a control name of the text control, a picture of the view control, and the like.
Further, in this embodiment, the subordinate control corresponding to the view control is a text control, and then the control corresponding to the subordinate node corresponding to the view control is a text control.
In this embodiment, step S2 is to identify the text controls included in the application program according to the configuration file, and determine the view control of the upper node of each text control according to the control structure tree.
And S3, correspondingly adjusting the character color value of the character control corresponding to each background picture according to the significant color value corresponding to the background picture corresponding to each view control.
In this embodiment, as shown in fig. 3, fig. 3 is a detailed flowchart of step S3. As can be seen from fig. 2, step S3 includes the following steps:
and S31-1, acquiring the background picture corresponding to each view control.
And S31-2, respectively counting the color values of the pixel points in each background picture and respectively counting the number of the pixel points corresponding to each color value in each background picture.
And S31-3, determining the significant color values corresponding to the background pictures according to the statistical result, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values.
Further, as shown in fig. 4, fig. 4 is a detailed flowchart of step S31-3. As can be seen from fig. 4, in this embodiment, step S31-3 includes the following steps:
and S31-3a, respectively comparing the number of the pixel points corresponding to each color value in each background picture.
And S31-3b, respectively finding out the color value with the maximum number of the corresponding pixel points in each background picture, wherein the color value with the maximum number of the pixel points is the significant color value corresponding to the background picture.
It should be noted that, if there are a plurality of color values with the largest number of corresponding pixel points in one background picture, one found color value is randomly selected as a significant color value corresponding to the background picture, and if there is one color value with the largest number of corresponding pixel points in one background picture, the found color value is the significant color value corresponding to the background picture.
Further, in order to ensure that the color of the control text is obviously different from the color of the control background picture, improve the identification accuracy of the control text, and further ensure that the user can see the text content of the control clearly, step S31-3 is refined as follows:
determining an opposite color value of a significant color value corresponding to the background picture;
and respectively adjusting the character color values of the character controls corresponding to the background picture to be corresponding opposite color values.
For example, if the inverse color value corresponding to the X1 background picture is a and the inverse color value corresponding to the X2 background picture is b, the text color value of the text control corresponding to the X1 background picture is adjusted to be the inverse color value a, and the text color value of the text control corresponding to the X2 background picture is adjusted to be the inverse color value b.
Compared with the prior art, in the embodiment, by obtaining the configuration file of the application program, the text control included in the application program is identified according to the configuration file, the view control of the upper node of each text control is determined according to the control structure tree of the text control, and then the text color value of the text control corresponding to each background picture is correspondingly adjusted according to the significant color value corresponding to the background picture corresponding to each view control. That is, under the condition that the color of the text background picture of the text control is very similar to the text color of the text control, the user can clearly see the text content of the control, so that the normal operation of the user on the text control is further ensured, and the condition that the user cannot operate the text control or has misoperation is avoided.
Further, in order to improve the accuracy of adjusting the text color value of the text control, in another embodiment of the present invention, as shown in fig. 5, fig. 5 is a flowchart of step S3 in another embodiment. As can be seen from fig. 5, in the present embodiment, step S3 includes the following steps:
and S32-1, acquiring the background picture corresponding to each view control, and determining the pixel area of each character control.
And S32-2, respectively determining the salient picture areas corresponding to the pixel areas of the corresponding character controls in each background picture.
For example, in the present embodiment, the salient picture region in each background picture coincides with the pixel region of the corresponding text control.
And S32-3, determining the significant color values corresponding to the significant picture areas, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values of the significant picture areas.
Further, as shown in FIG. 6, FIG. 6 is a detailed flowchart of step S32-3 in FIG. 5. As can be seen from fig. 6, in the present embodiment, step S32-3 includes the following steps:
and S32-3a, respectively counting the color values of the pixel points in each significant picture area and respectively counting the number of the pixel points corresponding to each color value in each significant picture area.
And S32-3b, determining the corresponding significant color value of each significant picture area according to the statistical result.
Compared with the prior art, in the embodiment, by obtaining the configuration file of the application program, the text control included in the application program is identified according to the configuration file, the view control of the upper node of each text control is determined according to the control structure tree of the text control, and then the text color value of the text control corresponding to each background picture is correspondingly adjusted according to the significant color value corresponding to the background picture corresponding to each view control. That is, under the condition that the color of the text background picture of the text control is very similar to the text color of the text control, the user can clearly see the text content of the control, so that the normal operation of the user on the text control is further ensured, and the condition that the user cannot operate the text control or has misoperation is avoided.
Compared with the above embodiment, in this embodiment, the text color values of the text controls corresponding to each background picture are adjusted according to the significant color values corresponding to the background pictures corresponding to each view control, instead of the text color values, a significant picture region corresponding to a pixel region of the text control corresponding to each background picture in the background picture is determined, significant color values corresponding to each significant picture region are determined, and text color values of the text controls corresponding to each background picture are adjusted according to the significant color values of the significant picture region. And furthermore, the adjustment accuracy of the character color value of the character control is further improved.
Please refer to fig. 7, which is a functional block diagram of a text color transformation system 10 according to a preferred embodiment of the present invention. In this embodiment, the text color transformation system 10 for the control can be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to complete the present invention. For example, in fig. 7, the text color transformation system 10 of the control can be divided into a first obtaining module 101, a first identifying module 102 and a first color transformation module 103. The module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the control character color transformation system 10 in the electronic device 1, wherein:
the first obtaining module 101 is configured to obtain a configuration file of an application program after the application program is online run and/or a text background picture of a text control of the application program is changed.
The first identification module 102 is configured to identify a text control included in an application program, and determine a view control of a higher node of each text control according to a control structure tree of the text control.
The first color transformation module 103 is configured to correspondingly adjust a text color value of a text control corresponding to each background picture according to a significant color value corresponding to the background picture corresponding to each view control.
In a preferred embodiment, as shown in fig. 8, on the basis of the embodiment of fig. 7, the first color conversion module 103 includes:
an obtaining unit 1031, configured to obtain background pictures corresponding to the view controls.
The counting unit 1032 is configured to count color values of each pixel in each background picture and count the number of pixels corresponding to each color value in each background picture.
And the control color value adjusting unit 1033 is configured to determine a significant color value corresponding to each background picture according to the statistical result, and correspondingly adjust a text color value of the text control corresponding to each background picture according to the significant color value corresponding to each background picture.
Further, as shown in fig. 9, based on the embodiment of fig. 8, the control color value adjusting unit 1033 includes:
the analyzing subunit 1033a is configured to compare the number of the pixels corresponding to each color value in each background picture.
The numerical value determining subunit 1033b is configured to find color values of the largest number of the corresponding pixel points in each background picture, where if there are multiple color values of the largest number of the corresponding pixel points in one background picture, one found color value is randomly selected as a significant color value corresponding to the background picture, and if there is one color value of the largest number of the corresponding pixel points in one background picture, the found color value is the significant color value corresponding to the background picture.
And a color value adjusting subunit 1033c, configured to correspondingly adjust the text color values of the text controls corresponding to the background pictures according to the significant color values corresponding to the background pictures.
It should be noted that, in other embodiments of the present invention, in order to improve the accuracy of adjusting the text color value of the text control, the text color transformation system of the control of the present invention further includes:
and the second acquisition module is used for acquiring the background picture corresponding to each view control and determining the pixel area of each character control.
And the second identification module is used for respectively counting the color values of all the pixel points in each significant picture region and respectively counting the number of the pixel points corresponding to all the color values in each significant picture region.
And the second statistical module is used for respectively counting the color values of all the pixel points in all the significant picture areas, namely respectively counting the number of the pixel points corresponding to all the color values in all the significant picture areas.
And the second color transformation module is used for determining the significant color values corresponding to the significant picture areas according to the statistical result and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values of the significant picture areas.
Compared with the prior art, the method comprises the steps of obtaining a configuration file of an application program after the application program is operated on line and/or after a text background picture of a text control of the application program is changed, identifying the text control contained in the application program in the configuration file, and determining the view control of the superior node of each text control according to a control structure tree in the configuration file; further acquiring background pictures corresponding to the view controls in the configuration file, respectively counting color values of pixel points in the background pictures and the number of the pixel points corresponding to the color values in the background pictures, determining the significant color values corresponding to the background pictures according to the statistical result, and correspondingly adjusting the character color values of the character controls corresponding to the background pictures according to the significant color values corresponding to the background pictures. Therefore, the user can see the text content of the control clearly, and the problem that the user cannot see the text content of the control clearly and cannot operate the text control or misoperation frequently occurs is solved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for converting the text color of a control is characterized by comprising the following steps:
A. after a text background picture of a text control of an application program is changed, acquiring a configuration file of the application program, wherein the configuration file comprises a control structure tree of each control of the application program and attribute data of each control, and the attribute data of each control comprises a pixel area of the control, a function of the control, a text name of the control of the text control and a background picture of a view control; the control structure tree comprises at least one control node branch, a main node of each control node branch corresponds to a first-layer control of the application program, a control corresponding to a lower-layer node is a lower-layer control corresponding to a corresponding upper-layer node under each control node branch, a lower-layer control corresponding to a view control is a character control, and a control corresponding to a lower-layer node corresponding to a node corresponding to the view control in the control structure tree is the character control; B. if the attribute data of one control comprises a control literal name, the control display control system identifies the control as a literal control, identifies the literal control contained in the application program according to the configuration file, and determines the view control of the superior node of each literal control according to the control structure tree of the literal control;
C. and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the significant color value corresponding to the background picture corresponding to the view control.
2. The method for text-to-color conversion of a control according to claim 1, wherein the step C comprises:
acquiring a background picture corresponding to the view control;
respectively counting the color values of all the pixel points in the background picture and the number of the pixel points corresponding to all the color values in the background picture;
and determining a significant color value corresponding to the background picture according to the statistical result, and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the significant color value corresponding to the background picture.
3. The method for text-to-color conversion of a control according to claim 2, wherein the step of determining the significant color value corresponding to the background picture according to the statistical result comprises:
respectively comparing the number of pixel points corresponding to each color value in the background picture;
respectively finding out color values with the maximum number of corresponding pixel points in the background pictures, if one color value with the maximum number of corresponding pixel points in one background picture is multiple, randomly selecting one found color value as a significant color value corresponding to the background picture, and if one color value with the maximum number of corresponding pixel points in one background picture is one, determining the found color value as the significant color value corresponding to the background picture.
4. The method for converting the text color of the control according to claim 1, wherein the step C is replaced by the following steps:
acquiring a background picture corresponding to the view control, and determining a pixel area of each character control;
respectively determining salient picture areas corresponding to the pixel areas of the corresponding character controls in the background picture;
and determining the significant color values corresponding to the significant picture areas, and correspondingly adjusting the character color values of the character controls corresponding to the background picture according to the significant color values of the significant picture areas.
5. The method of claim 4, wherein the determining the salient color values corresponding to the respective salient picture regions comprises:
respectively counting the color values of all the pixel points in each significant picture area and respectively counting the number of the pixel points corresponding to all the color values in each significant picture area;
and determining the corresponding significant color value of each significant picture area according to the statistical result.
6. An electronic device comprising a memory, a processor, and a text color transformation system for a control stored on the memory and executable on the processor, wherein the text color transformation system for the control when executed by the processor performs the steps of:
A. after a text background picture of a text control with an application program is changed, acquiring a configuration file of the application program, wherein the configuration file comprises a control structure tree of each control of the application program and attribute data of each control, the control structure tree comprises at least one control node branch, a main node of each control node branch corresponds to a first-layer control of the application program, a control corresponding to a lower-layer node is a lower-layer control corresponding to the control corresponding to a higher-layer node under each control node branch, a lower-layer control corresponding to a view control is a text control, and a control corresponding to the lower-layer node corresponding to the view control in the control structure tree is the text control;
B. the attribute data of the control comprises a pixel area of the control, the function of the control, the control literal name of the literal control and a background picture of the view control; if the attribute data of one control comprises a control literal name, the control display control system identifies the control as a literal control, identifies the literal control contained in the application program according to the configuration file, and determines the view control of the superior node of each literal control according to the control structure tree of the literal control;
C. and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the significant color value corresponding to the background picture corresponding to the view control.
7. The electronic device of claim 6, wherein the step C comprises:
acquiring a background picture corresponding to the view control;
respectively counting the color values of all the pixel points in the background picture and the number of the pixel points corresponding to all the color values in the background picture;
and determining a significant color value corresponding to the background picture according to the statistical result, and correspondingly adjusting the character color value of the character control corresponding to the background picture according to the significant color value corresponding to the background picture.
8. The electronic device of claim 7, wherein the step of determining the corresponding significant color value of the background picture according to the statistical result comprises:
respectively comparing the number of pixel points corresponding to each color value in the background picture;
respectively finding out color values with the maximum number of corresponding pixel points in the background pictures, if one color value with the maximum number of corresponding pixel points in one background picture is multiple, randomly selecting one found color value as a significant color value corresponding to the background picture, and if one color value with the maximum number of corresponding pixel points in one background picture is one, determining the found color value as the significant color value corresponding to the background picture.
9. The electronic device of claim 6, wherein the step C is replaced by the following steps:
acquiring a background picture corresponding to the view control, and determining a pixel area of each character control;
respectively determining salient picture areas corresponding to the pixel areas of the corresponding character controls in the background picture;
and determining the significant color values corresponding to the significant picture areas, and correspondingly adjusting the character color values of the character controls corresponding to the background picture according to the significant color values of the significant picture areas.
10. A computer-readable storage medium storing a project information presentation program executable by at least one processor to cause the at least one processor to perform the steps of the method of text-color transformation of a control of any of claims 1-5.
CN201710490394.7A 2017-06-25 2017-06-25 Control character color transformation method and system and electronic device Active CN107704253B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710490394.7A CN107704253B (en) 2017-06-25 2017-06-25 Control character color transformation method and system and electronic device
PCT/CN2017/108779 WO2019000746A1 (en) 2017-06-25 2017-10-31 Method for switching text color of control, and system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710490394.7A CN107704253B (en) 2017-06-25 2017-06-25 Control character color transformation method and system and electronic device

Publications (2)

Publication Number Publication Date
CN107704253A CN107704253A (en) 2018-02-16
CN107704253B true CN107704253B (en) 2021-05-07

Family

ID=61170486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710490394.7A Active CN107704253B (en) 2017-06-25 2017-06-25 Control character color transformation method and system and electronic device

Country Status (2)

Country Link
CN (1) CN107704253B (en)
WO (1) WO2019000746A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614723B (en) * 2018-04-28 2019-09-13 北京字节跳动网络技术有限公司 The method and device thereof for preventing the attribute information of interface control to be stolen
CN110858153B (en) * 2018-08-22 2023-08-15 沈阳美行科技股份有限公司 Control self-adaptive display method and device
CN109189682B (en) * 2018-08-27 2022-03-22 北京云测信息技术有限公司 Script recording method and device
CN111562955B (en) * 2020-02-27 2022-02-08 华为技术有限公司 Method and device for configuring theme colors of terminal equipment and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605175A (en) * 2009-07-13 2009-12-16 中兴通讯股份有限公司 A kind of method of displaying colorful desktop text by mobile terminal and device
US20110242128A1 (en) * 2010-04-01 2011-10-06 Catholic University Industry Academic Cooperation Foundation User's preference applied feeling-based image color control method using interactive genetic algorithm
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device
CN105700925A (en) * 2016-01-13 2016-06-22 深圳市华讯方舟软件信息科技有限公司 APP interface implementation method and apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101776991B (en) * 2009-12-28 2013-10-02 金蝶软件(中国)有限公司 Control display text replacing method and device
CN104808998B (en) * 2015-05-15 2018-06-19 广东欧珀移动通信有限公司 The method, device and mobile terminal of the global control of display

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605175A (en) * 2009-07-13 2009-12-16 中兴通讯股份有限公司 A kind of method of displaying colorful desktop text by mobile terminal and device
US20110242128A1 (en) * 2010-04-01 2011-10-06 Catholic University Industry Academic Cooperation Foundation User's preference applied feeling-based image color control method using interactive genetic algorithm
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device
CN105700925A (en) * 2016-01-13 2016-06-22 深圳市华讯方舟软件信息科技有限公司 APP interface implementation method and apparatus

Also Published As

Publication number Publication date
WO2019000746A1 (en) 2019-01-03
CN107704253A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107704253B (en) Control character color transformation method and system and electronic device
CN108388598B (en) Electronic device, data storage method, and storage medium
US20170278056A1 (en) Information processing apparatus, control method, and program
CN112118286B (en) Multi-thread link tracking method and device based on MDC and computer readable storage medium
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN107273104B (en) Processing method and device for configuration data structure
US20150121207A1 (en) Industrial automation workstation and display method for scaling and displaying text destined for a target industrial automation device
CN112306473B (en) Program interface parameter transmission method, system and related equipment
CN107122104B (en) Data display method and device
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
TW201933179A (en) Image data retrieving method and image data retrieving device
CN112528610A (en) Data labeling method and device, electronic equipment and storage medium
CN109189728B (en) Intelligent hardware device, magnetic disk data processing method and storage medium
CN111160193A (en) Key information extraction method, device and storage medium
CN108052521B (en) Coordinated data display method, application server and storage medium
US10305740B2 (en) System and method for performing mass renaming of list of items at run-time with variable differentiation factor
CN112003837B (en) Intelligent equipment adaptation method and device based on Modbus protocol and storage medium
CN111489295B (en) Image processing method, electronic device, and storage medium
US9778941B2 (en) Substrate processing system, storage medium and method of registering new device
CN110263310B (en) Data graph generation method and device and computer readable storage medium
CN103491537A (en) Method and device for getting access to wireless network
CN110442663B (en) Raster data batch clipping method and device and computer readable storage medium
CN108196848B (en) Interface embedded display method and device, user terminal and readable storage medium
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN112632422A (en) Intelligent image cutting method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant