Patent attributes
An electronic device and an in-screen optical detection assembly. The electronic device includes a middle frame, a screen, a circuit board, and a color temperature detection assembly, where the screen includes a display and a cover plate located on one side of the display; the middle frame is located between the display and the circuit board and provided with a first through hole; the optical detection assembly includes a light shield body and a light sensor, where the light shield body is provided with a light hole, a first end of the light shield body is connected to the circuit board, and a second end of the light shield body passes through the first through hole and extends to one side of the screen facing the middle frame; and the light sensor is disposed on the circuit board and located in the light hole.