Star Trek: Voyager: "Bride of Chaotica!"
Star Trek: Voyager, "Bride of Chaotica!" Production #207, season 5, episode 12 (27 January 1999).
The brief statement of premise on IMDb (lightly edited here — RDE): "The Voyager crew encounters photonic lifeforms that mistake warmongering characters as real in Tom Paris' far-fetched 'Captain Proton' holodeck program." The user-provided Storyline: "As Tom and Harry run an episode of their 'Captain Proton' holodeck program, Voyager gets caught in a layer of subspace. This 'subspace sand bar,' as they nickname it, is home to a race of photonic aliens that aren't able to detect Voyager or its carbon based lifeforms (e.g. humans). Instead, they transport onto the holodeck and thereby start a war with Dr. Chaotica's Army of Evil. When Voyager detects internal weapons fire on the holodeck, Capt. Janeway dispatches Tom and Tuvok to investigate, and the adventure begins."
Coverage by Anna L. Kaplan et al. in Cinefantastique 31.11 (April 2000), calls attention to the episode as a gentle parody of and homage to the FLASH GORDON serials of the 1930s and notes how "two black and white aliens beam into the [holodeck] program" (p. 43). The FLASH GORDON serials — definitely as watched on TV in the 1950s — were in black and white.
See for those "photonic lifeforms" living out lives, so to speak, on and far outside of the holodeck.
RDE, finishing, 9Jul22