├── .gitignore
├── ColorControl.UI
├── Blazor.cs
├── ColorControl.UI.csproj
├── Components
│ ├── App.razor
│ ├── Layout
│ │ ├── MainLayout.razor
│ │ ├── MainLayout.razor.css
│ │ ├── NavMenu.razor
│ │ ├── NavMenu.razor.css
│ │ ├── TopMenu.razor
│ │ └── TopMenu.razor.css
│ ├── Pages
│ │ ├── AMD
│ │ │ ├── AmdPresetPage.razor
│ │ │ ├── AmdSettings.razor
│ │ │ └── AmdSummary.razor
│ │ ├── ColorProfile
│ │ │ ├── ColorProfilePage.razor
│ │ │ └── ColorProfileSummary.razor
│ │ ├── Error.razor
│ │ ├── Game
│ │ │ ├── GamePresetPage.razor
│ │ │ ├── GameSettings.razor
│ │ │ └── GameSummary.razor
│ │ ├── Generic
│ │ │ ├── ConfirmModal.razor
│ │ │ ├── FieldDefs.razor
│ │ │ ├── FieldsModal.razor
│ │ │ ├── FlagsInput.razor
│ │ │ ├── NotificationsComponent.razor
│ │ │ ├── NullableRangeInput.razor
│ │ │ ├── RangeInput.razor
│ │ │ ├── ShortcutInput.razor
│ │ │ ├── StartProgramInput.razor
│ │ │ ├── StepsInput.razor
│ │ │ └── TriggerInput.razor
│ │ ├── Home.razor
│ │ ├── Info.razor
│ │ ├── LG
│ │ │ ├── LgDevicePage.razor
│ │ │ ├── LgExecuteActionModal.razor
│ │ │ ├── LgPresetPage.razor
│ │ │ ├── LgSettings.razor
│ │ │ └── LgSummary.razor
│ │ ├── Logging.razor
│ │ ├── Nvidia
│ │ │ ├── NvidiaDithering.razor
│ │ │ ├── NvidiaDriverSettings.razor
│ │ │ ├── NvidiaGpuSettings.razor
│ │ │ ├── NvidiaInfo.razor
│ │ │ ├── NvidiaPreset.razor
│ │ │ ├── NvidiaSettings.razor
│ │ │ └── NvidiaSummary.razor
│ │ ├── Options.razor
│ │ ├── RemoteControl
│ │ │ ├── GenericRcButtonPage.razor
│ │ │ └── GenericRcPage.razor
│ │ └── Samsung
│ │ │ ├── SamsungDevicePage.razor
│ │ │ ├── SamsungPresetPage.razor
│ │ │ ├── SamsungServiceMenu.razor
│ │ │ ├── SamsungSettings.razor
│ │ │ └── SamsungSummary.razor
│ ├── Routes.razor
│ └── _Imports.razor
├── Constants.cs
├── Extensions
│ ├── GeneralExtensions.cs
│ └── PresetExtensions.cs
├── NotificationDto.cs
├── Program.cs
├── Properties
│ └── launchSettings.json
├── Services
│ ├── JSHelper.cs
│ ├── NotificationService.cs
│ └── RpcUiClientService.cs
├── State
│ └── AppState.cs
├── appsettings.Development.json
├── appsettings.json
└── wwwroot
│ ├── app.css
│ ├── favicon.png
│ ├── helper.js
│ └── remotes
│ ├── LG_FactorySVC.jpg
│ ├── LG_MR20GA.jpg
│ ├── LG_MR23GN.jpg
│ ├── Samsung_AA81-00243A.jpg
│ └── Samsung_BN59-01315B.jpg
├── ColorControl.sln
├── ColorControl
├── .upgrade-assistant
├── AnalysisReport.sarif
├── ColorControl.csproj
├── CommandLineHandler.cs
├── Forms
│ ├── InfoPanel.Designer.cs
│ ├── InfoPanel.cs
│ ├── InfoPanel.resx
│ ├── OptionsPanel.Designer.cs
│ ├── OptionsPanel.cs
│ └── OptionsPanel.resx
├── IModulePanel.cs
├── LgPresets.json
├── LgTv
│ └── LgTvConnectionCws.cs
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── MainWorker.cs
├── Program.cs
├── Properties
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── app.manifest
│ └── launchSettings.json
├── Resources
│ ├── LG_register.json
│ ├── LG_remote.jpg
│ ├── LgRemotes.json
│ ├── RC_coords.txt
│ ├── SamsungRemotes.json
│ └── pngbarn.ico
├── Services
│ ├── AMD
│ │ ├── AmdDisplayInfo.cs
│ │ ├── AmdPanel.Designer.cs
│ │ ├── AmdPanel.cs
│ │ ├── AmdPanel.resx
│ │ └── AmdService.cs
│ ├── Common
│ │ ├── ColorProfileService.cs
│ │ ├── ElevationService.cs
│ │ ├── GraphicsService.cs
│ │ ├── IServiceBase.cs
│ │ ├── LoggingService.cs
│ │ ├── NotifyIconManager.cs
│ │ ├── OptionsService.cs
│ │ ├── QuickAccessForm.Designer.cs
│ │ ├── QuickAccessForm.cs
│ │ ├── QuickAccessForm.resx
│ │ ├── ServiceBase.cs
│ │ ├── ServiceFormUtils.cs
│ │ ├── ServiceManager.cs
│ │ └── UpdateManager.cs
│ ├── GameLauncher
│ │ ├── GamePanel.Designer.cs
│ │ ├── GamePanel.cs
│ │ ├── GamePanel.resx
│ │ └── GameService.cs
│ ├── LG
│ │ ├── LgDevice.cs
│ │ ├── LgGameBar.Designer.cs
│ │ ├── LgGameBar.cs
│ │ ├── LgGameBar.resx
│ │ ├── LgPanel.Designer.cs
│ │ ├── LgPanel.cs
│ │ ├── LgPanel.resx
│ │ ├── LgService.cs
│ │ ├── LgServiceConfig.cs
│ │ ├── RemoteControlForm.Designer.cs
│ │ ├── RemoteControlForm.cs
│ │ ├── RemoteControlForm.resx
│ │ ├── RemoteControlPanel.Designer.cs
│ │ ├── RemoteControlPanel.cs
│ │ └── RemoteControlPanel.resx
│ ├── NVIDIA
│ │ ├── ColorDataConverter.cs
│ │ ├── Kernel32.cs
│ │ ├── NvDisplayInfo.cs
│ │ ├── NvDitherPanel.Designer.cs
│ │ ├── NvDitherPanel.cs
│ │ ├── NvDitherPanel.resx
│ │ ├── NvGpuInfo.cs
│ │ ├── NvInfoPanel.Designer.cs
│ │ ├── NvInfoPanel.cs
│ │ ├── NvInfoPanel.resx
│ │ ├── NvPanel.Designer.cs
│ │ ├── NvPanel.cs
│ │ ├── NvPanel.resx
│ │ ├── NvService.cs
│ │ └── NvidiaML.cs
│ └── Samsung
│ │ ├── ISamsungService.cs
│ │ ├── RawRequestMessage.cs
│ │ ├── RequestMessage.cs
│ │ ├── SamTvConnection.cs
│ │ ├── SamsungApp.cs
│ │ ├── SamsungDevice.cs
│ │ ├── SamsungPanel.Designer.cs
│ │ ├── SamsungPanel.cs
│ │ ├── SamsungPanel.resx
│ │ ├── SamsungService.cs
│ │ └── SamsungServiceConfig.cs
├── Svc
│ └── ColorControlBackgroundService.cs
├── XForms
│ ├── BrowserWindow.xaml
│ ├── BrowserWindow.xaml.cs
│ ├── ColorProfileViewModel.cs
│ ├── ColorProfileWindow.xaml
│ ├── ColorProfileWindow.xaml.cs
│ ├── LogWindow.xaml
│ └── LogWindow.xaml.cs
└── lgtv
│ ├── App.cs
│ ├── Channel.cs
│ ├── ClientKeyStore.cs
│ ├── ExternalInput.cs
│ ├── LgApp.cs
│ ├── LgTvApi.cs
│ ├── LgWebOsMouseService.cs
│ ├── README.md
│ ├── RawRequestMessage.cs
│ └── RequestMessage.cs
├── LICENSE-NOVIDEO.txt
├── LICENSE-THIRD-PARTY.txt
├── LICENSE.txt
├── LittleCms
├── CmsContext.cs
├── CmsDefinition.cs
├── CmsError.cs
├── CmsExtension.cs
├── CmsGlobal.cs
├── CmsNative.cs
├── CmsObject.cs
├── CmsPixelFormat.cs
├── CmsTransform.cs
├── Data
│ ├── BlittableDataTagSignature.cs
│ ├── ChromaticAdaptationTagSignature.cs
│ ├── ISafeTagSignature.cs
│ ├── IccDataTagSignature.cs
│ ├── MLU.cs
│ ├── MluTagSignature.cs
│ ├── RgbToneCurve.cs
│ ├── SafeTagSignature.cs
│ ├── TagNotFoundException.cs
│ ├── ToneCurve.cs
│ ├── ToneCurveTagSignature.cs
│ └── VideoCardGammaTableTagSignature.cs
├── IccProfile.cs
├── LittleCms.csproj
└── lcms2.dll
├── MHC2Gen
├── CmsFunctions.cs
├── DisplayEnums.cs
├── Extension.cs
├── GenerateProfileCommand.cs
├── IccContext.cs
├── MHC2Gen.csproj
├── MHC2Wrapper.cs
├── Primaries.cs
└── ST2084.cs
├── NLogViewer
├── ActionCommand.cs
├── Extensions
│ └── DependencyObjectExtensions.cs
├── Helper
│ ├── AutoSizedGridView.cs
│ ├── ListViewLayoutManager
│ │ ├── ConverterGridViewColumn.cs
│ │ ├── FixedColumn.cs
│ │ ├── ImageGridViewColumn.cs
│ │ ├── LayoutColumn.cs
│ │ ├── ListViewLayoutManager.cs
│ │ ├── ProportionalColumn.cs
│ │ └── RangeColumn.cs
│ └── PredicateBuilder.cs
├── Images
│ ├── Glyphs
│ │ ├── SortDownArrow.png
│ │ └── SortUpArrow.png
│ └── Small
│ │ ├── Add.png
│ │ ├── Clear.png
│ │ ├── Clock.png
│ │ ├── Context.png
│ │ ├── Debug.png
│ │ ├── DebugSource.png
│ │ ├── Error.png
│ │ ├── Exception.png
│ │ ├── Exit.png
│ │ ├── Export.png
│ │ ├── Fatal.png
│ │ ├── Info.png
│ │ ├── Layout.png
│ │ ├── MonoLightning.png
│ │ ├── Network.png
│ │ ├── Open.png
│ │ ├── Pause.png
│ │ ├── Save.png
│ │ ├── ScrollDown.png
│ │ ├── Settings.png
│ │ ├── Thread.png
│ │ ├── Trace.png
│ │ ├── Unknown.png
│ │ └── Warning.png
├── NLogViewer.csproj
├── NLogViewer.xaml
├── NLogViewer.xaml.cs
├── Resolver
│ ├── ILogEventInfoResolver.cs
│ ├── IdResolver.cs
│ ├── LoggerNameResolver.cs
│ ├── MessageResolver.cs
│ └── TimeStampResolver.cs
├── ScrollingHelper.cs
├── Targets
│ └── CacheTarget.cs
├── XamlMultiValueConverter
│ └── ILogEventResolverToStringConverter.cs
└── nuget.config
├── Nspector
├── Common
│ ├── Cache
│ │ ├── CachedSettingValue.cs
│ │ └── CachedSettings.cs
│ ├── CustomSettings
│ │ ├── CustomSetting.cs
│ │ ├── CustomSettingNames.cs
│ │ └── CustomSettingValue.cs
│ ├── DrsDecrypterService.cs
│ ├── DrsImportService.cs
│ ├── DrsScannerService.cs
│ ├── DrsServiceLocator.cs
│ ├── DrsSessionScope.cs
│ ├── DrsSettingsMetaService.cs
│ ├── DrsSettingsService.cs
│ ├── DrsSettingsServiceBase.cs
│ ├── DrsUtil.cs
│ ├── Helper
│ │ ├── AdminHelper.cs
│ │ ├── DropDownMenuScrollWheelHandler.cs
│ │ ├── InputBox.cs
│ │ ├── ListSort.cs
│ │ ├── ListViewGroupSorter.cs
│ │ ├── NoBorderRenderer.cs
│ │ ├── ShortcutResolver.cs
│ │ ├── SteamAppResolver.cs
│ │ ├── TempFile.cs
│ │ ├── UserSettings.cs
│ │ └── XMLHelper.cs
│ ├── Import
│ │ ├── ImportExportUitl.cs
│ │ ├── Profile.cs
│ │ ├── ProfileSetting.cs
│ │ ├── Profiles.cs
│ │ └── SettingValueType.cs
│ ├── Meta
│ │ ├── ConstantSettingMetaService.cs
│ │ ├── CustomSettingMetaService.cs
│ │ ├── DriverSettingMetaService.cs
│ │ ├── ISettingMetaService.cs
│ │ ├── MetaServiceItem.cs
│ │ ├── ScannedSettingMetaService.cs
│ │ ├── SettingMeta.cs
│ │ ├── SettingMetaSource.cs
│ │ └── SettingValue.cs
│ ├── NvapiException.cs
│ ├── SettingItem.cs
│ └── SettingViewMode.cs
├── Images
│ ├── 0_gear2.png
│ ├── 1_gear2_2.png
│ ├── 4_gear_nv2.png
│ ├── 6_gear_inherit.png
│ ├── PortableDeviceStatus_3_16-011.png
│ ├── apply.png
│ ├── export1.png
│ ├── filter_user.png
│ ├── find_set2.png
│ ├── home_sm.png
│ ├── ieframe_1_18212.png
│ ├── ieframe_1_31073-002.png
│ ├── import1.png
│ ├── n1-016.png
│ ├── nv_btn.png
│ ├── shield.png
│ ├── shield16.ico
│ ├── text_binary.png
│ ├── transparent16.png
│ ├── window_application_add.png
│ └── window_application_delete.png
├── ListViewEx.cs
├── Native
│ ├── NVAPI
│ │ ├── NvApiDriverSettings.cs
│ │ ├── NvApiDriverSettings.h
│ │ ├── NvApiDriverSettings.tt
│ │ └── NvapiDrsWrapper.cs
│ ├── NativeArrayHelper.cs
│ └── WINAPI
│ │ ├── DragAcceptNativeHelper.cs
│ │ ├── MessageHelper.cs
│ │ ├── SafeNativeMethods.cs
│ │ ├── ShellLink.cs
│ │ └── TaskBarList3.cs
├── Nspector.csproj
├── Properties
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── app.manifest
├── frmBitEditor.Designer.cs
├── frmBitEditor.cs
├── frmBitEditor.resx
├── frmDrvSettings.Designer.cs
├── frmDrvSettings.cs
├── frmDrvSettings.resx
├── frmExportProfiles.Designer.cs
├── frmExportProfiles.cs
├── frmExportProfiles.resx
├── n1.ico
├── nspector
│ ├── CustomSettingNames.xml
│ └── Reference.xml
└── nvidiaProfileInspector.csproj
├── NvAPIWrapper
├── Display
│ ├── ColorData.cs
│ ├── CustomResolution.cs
│ ├── DVCInformation.cs
│ ├── Display.cs
│ ├── DisplayDevice.cs
│ ├── FloatTexture.cs
│ ├── HDRColorData.cs
│ ├── HUEInformation.cs
│ ├── IntensityTexture.cs
│ ├── IntensityTexturePixel.cs
│ ├── PathInfo.cs
│ ├── PathTargetInfo.cs
│ ├── ScanOutInformation.cs
│ ├── UnAttachedDisplay.cs
│ └── XYUVRQVortex.cs
├── GPU
│ ├── AGPInformation.cs
│ ├── ECCMemoryInformation.cs
│ ├── GPUArchitectInformation.cs
│ ├── GPUBusInformation.cs
│ ├── GPUCooler.cs
│ ├── GPUCoolerInformation.cs
│ ├── GPUMemoryInformation.cs
│ ├── GPUOutput.cs
│ ├── GPUPerformanceControl.cs
│ ├── GPUPerformanceState.cs
│ ├── GPUPerformanceStateClock.cs
│ ├── GPUPerformanceStateValueRange.cs
│ ├── GPUPerformanceStateVoltage.cs
│ ├── GPUPerformanceStatesInfo.cs
│ ├── GPUPowerLimitInfo.cs
│ ├── GPUPowerLimitPolicy.cs
│ ├── GPUPowerTopologyInformation.cs
│ ├── GPUPowerTopologyStatus.cs
│ ├── GPUThermalInformation.cs
│ ├── GPUThermalLimitInfo.cs
│ ├── GPUThermalLimitPolicy.cs
│ ├── GPUThermalSensor.cs
│ ├── GPUUsageDomainStatus.cs
│ ├── GPUUsageInformation.cs
│ ├── LogicalGPU.cs
│ ├── PCIIdentifiers.cs
│ ├── PCIeInformation.cs
│ ├── PhysicalGPU.cs
│ └── VideoBIOS.cs
├── Icon.png
├── NVIDIA.cs
├── Native
│ ├── Attributes
│ │ ├── AcceptsAttribute.cs
│ │ ├── FunctionIdAttribute.cs
│ │ └── StructureVersionAttribute.cs
│ ├── Constants
│ │ ├── Display.cs
│ │ └── General.cs
│ ├── Delegates
│ │ ├── Display.cs
│ │ ├── GPU.cs
│ │ ├── General.cs
│ │ └── Stereo.cs
│ ├── Display
│ │ ├── ColorDataColorimetry.cs
│ │ ├── ColorDataCommand.cs
│ │ ├── ColorDataDepth.cs
│ │ ├── ColorDataDesktopDepth.cs
│ │ ├── ColorDataDynamicRange.cs
│ │ ├── ColorDataFormat.cs
│ │ ├── ColorDataHDRCommand.cs
│ │ ├── ColorDataHDRMode.cs
│ │ ├── ColorDataSelectionPolicy.cs
│ │ ├── ColorFormat.cs
│ │ ├── DisplayConfigFlags.cs
│ │ ├── DisplayPortColorDepth.cs
│ │ ├── DisplayPortColorFormat.cs
│ │ ├── InfoFrameAudioChannelAllocation.cs
│ │ ├── InfoFrameAudioChannelCount.cs
│ │ ├── InfoFrameAudioCodec.cs
│ │ ├── InfoFrameAudioExtendedCodec.cs
│ │ ├── InfoFrameAudioLFEPlaybackLevel.cs
│ │ ├── InfoFrameAudioLevelShift.cs
│ │ ├── InfoFrameAudioSampleRate.cs
│ │ ├── InfoFrameAudioSampleSize.cs
│ │ ├── InfoFrameBoolean.cs
│ │ ├── InfoFrameCommand.cs
│ │ ├── InfoFrameDataType.cs
│ │ ├── InfoFramePropertyMode.cs
│ │ ├── InfoFrameVideoAspectRatioActivePortion.cs
│ │ ├── InfoFrameVideoAspectRatioCodedFrame.cs
│ │ ├── InfoFrameVideoBarData.cs
│ │ ├── InfoFrameVideoColorFormat.cs
│ │ ├── InfoFrameVideoColorimetry.cs
│ │ ├── InfoFrameVideoContentType.cs
│ │ ├── InfoFrameVideoExtendedColorimetry.cs
│ │ ├── InfoFrameVideoITC.cs
│ │ ├── InfoFrameVideoNonUniformPictureScaling.cs
│ │ ├── InfoFrameVideoPixelRepetition.cs
│ │ ├── InfoFrameVideoRGBQuantization.cs
│ │ ├── InfoFrameVideoScanInfo.cs
│ │ ├── InfoFrameVideoYCCQuantization.cs
│ │ ├── MonitorCapabilitiesConnectorType.cs
│ │ ├── MonitorCapabilitiesType.cs
│ │ ├── Rotate.cs
│ │ ├── Scaling.cs
│ │ ├── ScanOutCompositionParameter.cs
│ │ ├── ScanOutCompositionParameterValue.cs
│ │ ├── SpanningOrientation.cs
│ │ ├── StaticMetadataDescriptorId.cs
│ │ ├── Structures
│ │ │ ├── ColorDataColorCoordinate.cs
│ │ │ ├── ColorDataV1.cs
│ │ │ ├── ColorDataV2.cs
│ │ │ ├── ColorDataV3.cs
│ │ │ ├── ColorDataV4.cs
│ │ │ ├── ColorDataV5.cs
│ │ │ ├── CustomDisplay.cs
│ │ │ ├── DisplayColorData.cs
│ │ │ ├── DisplayHandle.cs
│ │ │ ├── HDMISupportInfoV1.cs
│ │ │ ├── HDMISupportInfoV2.cs
│ │ │ ├── HDRCapabilitiesV1.cs
│ │ │ ├── HDRColorDataV1.cs
│ │ │ ├── HDRColorDataV2.cs
│ │ │ ├── InfoFrameAudio.cs
│ │ │ ├── InfoFrameData.cs
│ │ │ ├── InfoFrameProperty.cs
│ │ │ ├── InfoFrameVideo.cs
│ │ │ ├── LUID.cs
│ │ │ ├── MasteringDisplayColorData.cs
│ │ │ ├── MonitorCapabilities.cs
│ │ │ ├── MonitorColorData.cs
│ │ │ ├── MonitorVCDBCapabilities.cs
│ │ │ ├── MonitorVSDBCapabilities.cs
│ │ │ ├── PathAdvancedTargetInfo.cs
│ │ │ ├── PathInfoV1.cs
│ │ │ ├── PathInfoV2.cs
│ │ │ ├── PathTargetInfoV1.cs
│ │ │ ├── PathTargetInfoV2.cs
│ │ │ ├── Position.cs
│ │ │ ├── PrivateDisplayDVCInfo.cs
│ │ │ ├── PrivateDisplayDVCInfoEx.cs
│ │ │ ├── PrivateDisplayHUEInfo.cs
│ │ │ ├── Resolution.cs
│ │ │ ├── ScanOutInformationV1.cs
│ │ │ ├── ScanOutIntensityStateV1.cs
│ │ │ ├── ScanOutIntensityV1.cs
│ │ │ ├── ScanOutIntensityV2.cs
│ │ │ ├── ScanOutWarpingStateV1.cs
│ │ │ ├── ScanOutWarpingV1.cs
│ │ │ ├── SourceModeInfo.cs
│ │ │ ├── Timing.cs
│ │ │ ├── TimingExtra.cs
│ │ │ ├── TimingInput.cs
│ │ │ ├── UnAttachedDisplayHandle.cs
│ │ │ └── ViewPortF.cs
│ │ ├── TVFormat.cs
│ │ ├── TargetViewMode.cs
│ │ ├── TimingHorizontalSyncPolarity.cs
│ │ ├── TimingOverride.cs
│ │ ├── TimingScanMode.cs
│ │ ├── TimingVerticalSyncPolarity.cs
│ │ └── WarpingVerticeFormat.cs
│ ├── DisplayApi.cs
│ ├── Exceptions
│ │ ├── NVIDIAApiException.cs
│ │ └── NVIDIANotSupportedException.cs
│ ├── GPU
│ │ ├── ClockLockMode.cs
│ │ ├── ClockType.cs
│ │ ├── ConnectedIdsFlag.cs
│ │ ├── ConnectorType.cs
│ │ ├── CoolerControlMode.cs
│ │ ├── CoolerController.cs
│ │ ├── CoolerPolicy.cs
│ │ ├── CoolerTarget.cs
│ │ ├── CoolerType.cs
│ │ ├── ECCConfiguration.cs
│ │ ├── FanCoolersControlMode.cs
│ │ ├── GPUBusType.cs
│ │ ├── GPUFoundry.cs
│ │ ├── GPUMemoryMaker.cs
│ │ ├── GPUMemoryType.cs
│ │ ├── GPUType.cs
│ │ ├── GetPerformanceStatesInfoFlags.cs
│ │ ├── I2CSpeed.cs
│ │ ├── IlluminationAttribute.cs
│ │ ├── IlluminationDeviceType.cs
│ │ ├── IlluminationPiecewiseLinearCycleType.cs
│ │ ├── IlluminationZoneControlMode.cs
│ │ ├── IlluminationZoneControlValuesType.cs
│ │ ├── IlluminationZoneLocation.cs
│ │ ├── IlluminationZoneType.cs
│ │ ├── MonitorConnectionType.cs
│ │ ├── OutputId.cs
│ │ ├── OutputType.cs
│ │ ├── PCIeGeneration.cs
│ │ ├── PerformanceDecreaseReason.cs
│ │ ├── PerformanceLimit.cs
│ │ ├── PerformanceStateId.cs
│ │ ├── PerformanceStates20ClockType.cs
│ │ ├── PerformanceVoltageDomain.cs
│ │ ├── PowerTopologyDomain.cs
│ │ ├── PublicClockDomain.cs
│ │ ├── Structures
│ │ │ ├── BoardInfo.cs
│ │ │ ├── ClockDomainInfo.cs
│ │ │ ├── ClockFrequenciesV1.cs
│ │ │ ├── ClockFrequenciesV2.cs
│ │ │ ├── ClockFrequenciesV3.cs
│ │ │ ├── DisplayDriverMemoryInfoV1.cs
│ │ │ ├── DisplayDriverMemoryInfoV2.cs
│ │ │ ├── DisplayDriverMemoryInfoV3.cs
│ │ │ ├── DisplayIdsV2.cs
│ │ │ ├── DynamicPerformanceStatesInfoV1.cs
│ │ │ ├── ECCConfigurationInfoV1.cs
│ │ │ ├── ECCErrorInfoV1.cs
│ │ │ ├── ECCStatusInfoV1.cs
│ │ │ ├── EDIDV1.cs
│ │ │ ├── EDIDV2.cs
│ │ │ ├── EDIDV3.cs
│ │ │ ├── GetIlluminationParameterV1.cs
│ │ │ ├── I2CInfoV2.cs
│ │ │ ├── I2CInfoV3.cs
│ │ │ ├── IlluminationDeviceControlParametersV1.cs
│ │ │ ├── IlluminationDeviceControlV1.cs
│ │ │ ├── IlluminationDeviceInfoParametersV1.cs
│ │ │ ├── IlluminationDeviceInfoV1.cs
│ │ │ ├── IlluminationDeviceSyncV1.cs
│ │ │ ├── IlluminationZoneControlDataFixedColor.cs
│ │ │ ├── IlluminationZoneControlDataFixedColorParameters.cs
│ │ │ ├── IlluminationZoneControlDataManualFixedColor.cs
│ │ │ ├── IlluminationZoneControlDataManualRGB.cs
│ │ │ ├── IlluminationZoneControlDataManualRGBParameters.cs
│ │ │ ├── IlluminationZoneControlDataPiecewiseLinear.cs
│ │ │ ├── IlluminationZoneControlDataPiecewiseLinearFixedColor.cs
│ │ │ ├── IlluminationZoneControlDataPiecewiseLinearRGB.cs
│ │ │ ├── IlluminationZoneControlDataRGB.cs
│ │ │ ├── IlluminationZoneControlParametersV1.cs
│ │ │ ├── IlluminationZoneControlV1.cs
│ │ │ ├── IlluminationZoneInfoParametersV1.cs
│ │ │ ├── IlluminationZoneInfoV1.cs
│ │ │ ├── LogicalGPUHandle.cs
│ │ │ ├── PerformanceStates20BaseVoltageEntryV1.cs
│ │ │ ├── PerformanceStates20ClockEntryV1.cs
│ │ │ ├── PerformanceStates20InfoV1.cs
│ │ │ ├── PerformanceStates20InfoV2.cs
│ │ │ ├── PerformanceStates20InfoV3.cs
│ │ │ ├── PerformanceStates20ParameterDelta.cs
│ │ │ ├── PerformanceStatesInfoV1.cs
│ │ │ ├── PerformanceStatesInfoV2.cs
│ │ │ ├── PerformanceStatesInfoV3.cs
│ │ │ ├── PhysicalGPUHandle.cs
│ │ │ ├── PrivateActiveApplicationV2.cs
│ │ │ ├── PrivateArchitectInfoV2.cs
│ │ │ ├── PrivateClockBoostLockV2.cs
│ │ │ ├── PrivateClockBoostMasksV1.cs
│ │ │ ├── PrivateClockBoostRangesV1.cs
│ │ │ ├── PrivateClockBoostTableV1.cs
│ │ │ ├── PrivateClockBoostTableV2.cs
│ │ │ ├── PrivateCoolerLevelsV1.cs
│ │ │ ├── PrivateCoolerPolicyTableV1.cs
│ │ │ ├── PrivateCoolerSettingsV1.cs
│ │ │ ├── PrivateFanCoolersControlV1.cs
│ │ │ ├── PrivateFanCoolersInfoV1.cs
│ │ │ ├── PrivateFanCoolersStatusV1.cs
│ │ │ ├── PrivatePCIeInfoV2.cs
│ │ │ ├── PrivatePerformanceInfoV1.cs
│ │ │ ├── PrivatePerformanceStatusV1.cs
│ │ │ ├── PrivatePowerPoliciesInfoV1.cs
│ │ │ ├── PrivatePowerPoliciesStatusV1.cs
│ │ │ ├── PrivatePowerTopologiesStatusV1.cs
│ │ │ ├── PrivateThermalPoliciesInfoV2.cs
│ │ │ ├── PrivateThermalPoliciesStatusV2.cs
│ │ │ ├── PrivateThermalSensorsV2.cs
│ │ │ ├── PrivateUsagesInfoV1.cs
│ │ │ ├── PrivateVFPCurveV1.cs
│ │ │ ├── PrivateVFPCurveV3.cs
│ │ │ ├── PrivateVoltageBoostPercentV1.cs
│ │ │ ├── PrivateVoltageStatusV1.cs
│ │ │ ├── QueryIlluminationSupportParameterV1.cs
│ │ │ ├── SetIlluminationParameterV1.cs
│ │ │ ├── ThermalSettingsV1.cs
│ │ │ └── ThermalSettingsV2.cs
│ │ ├── SystemType.cs
│ │ ├── ThermalController.cs
│ │ ├── ThermalSettingsTarget.cs
│ │ └── UtilizationDomain.cs
│ ├── GPUApi.Display.cs
│ ├── GPUApi.Illumination.cs
│ ├── GPUApi.Performance.cs
│ ├── GPUApi.PowerPolicies.cs
│ ├── GPUApi.Thermal.cs
│ ├── GPUApi.Usage.cs
│ ├── GPUApi.cs
│ ├── General
│ │ ├── ChipsetInfoFlag.cs
│ │ ├── Status.cs
│ │ └── Structures
│ │ │ ├── ChipsetInfoV1.cs
│ │ │ ├── ChipsetInfoV2.cs
│ │ │ ├── ChipsetInfoV3.cs
│ │ │ ├── ChipsetInfoV4.cs
│ │ │ ├── GenericString.cs
│ │ │ ├── LIDDockParameters.cs
│ │ │ ├── LongString.cs
│ │ │ ├── Rectangle.cs
│ │ │ ├── ShortString.cs
│ │ │ ├── StructureVersion.cs
│ │ │ └── UnicodeString.cs
│ ├── GeneralApi.cs
│ ├── Helpers
│ │ ├── DelegateFactory.cs
│ │ ├── ExtensionMethods.cs
│ │ ├── FunctionId.cs
│ │ └── Structures
│ │ │ ├── ValueTypeArray.cs
│ │ │ ├── ValueTypeArray`1.cs
│ │ │ ├── ValueTypeReference.cs
│ │ │ └── ValueTypeReference`1.cs
│ ├── Interfaces
│ │ ├── Display
│ │ │ ├── IColorData.cs
│ │ │ ├── IDisplayColorData.cs
│ │ │ ├── IDisplayDVCInfo.cs
│ │ │ ├── IHDMISupportInfo.cs
│ │ │ ├── IHDRColorData.cs
│ │ │ ├── IPathInfo.cs
│ │ │ ├── IPathTargetInfo.cs
│ │ │ └── IScanOutIntensityData.cs
│ │ ├── GPU
│ │ │ ├── IClockFrequencies.cs
│ │ │ ├── IDisplayDriverMemoryInfo.cs
│ │ │ ├── IDisplayIds.cs
│ │ │ ├── IEDID.cs
│ │ │ ├── II2CInfo.cs
│ │ │ ├── IPerformanceState.cs
│ │ │ ├── IPerformanceState20.cs
│ │ │ ├── IPerformanceStates20ClockDependentFrequencyRange.cs
│ │ │ ├── IPerformanceStates20ClockDependentSingleFrequency.cs
│ │ │ ├── IPerformanceStates20ClockEntry.cs
│ │ │ ├── IPerformanceStates20Info.cs
│ │ │ ├── IPerformanceStates20VoltageEntry.cs
│ │ │ ├── IPerformanceStatesClock.cs
│ │ │ ├── IPerformanceStatesInfo.cs
│ │ │ ├── IPerformanceStatesVoltage.cs
│ │ │ ├── IThermalSensor.cs
│ │ │ ├── IThermalSettings.cs
│ │ │ ├── IUtilizationDomainInfo.cs
│ │ │ └── IUtilizationStatus.cs
│ │ ├── General
│ │ │ └── IChipsetInfo.cs
│ │ ├── IAllocatable.cs
│ │ ├── IHandle.cs
│ │ └── IInitializable.cs
│ ├── Stereo
│ │ ├── StereoActivationFlag.cs
│ │ ├── StereoActiveEye.cs
│ │ ├── StereoDriverMode.cs
│ │ ├── StereoFrustumAdjustMode.cs
│ │ ├── StereoRegistryIdentification.cs
│ │ ├── StereoRegistryProfileType.cs
│ │ ├── StereoSurfaceCreateMode.cs
│ │ ├── StereoSwapChainMode.cs
│ │ └── Structures
│ │ │ ├── StereoCapabilities.cs
│ │ │ └── StereoHandle.cs
│ └── StereoApi.cs
├── NvAPIWrapper.csproj
├── Stereo
│ ├── StereoApplicationConfiguration.cs
│ └── StereoDeviceSession.cs
└── readme.txt
├── README.md
├── Shared
├── Common
│ ├── ExceptionExtensions.cs
│ ├── GlobalContext.cs
│ ├── InfoDto.cs
│ ├── NestedItemsBuilder.cs
│ ├── PipeUtils.cs
│ ├── ProcessExtensions.cs
│ ├── ShortcutStruct.cs
│ ├── StreamString.cs
│ ├── UpdateInfoDto.cs
│ └── Utils.cs
├── Contracts
│ ├── AMD
│ │ ├── ADL.cs
│ │ ├── ADLWrapper.cs
│ │ ├── AmdPreset.cs
│ │ └── AmdServiceConfig.cs
│ ├── Base
│ │ └── BaseDeviceDto.cs
│ ├── Config.cs
│ ├── Delegates.cs
│ ├── DisplayConfig.cs
│ ├── DisplayInfo
│ │ ├── ColorProfileDto.cs
│ │ └── DisplayInfoDto.cs
│ ├── DpiScaling.cs
│ ├── FieldDefinition.cs
│ ├── Game
│ │ ├── GameApp.cs
│ │ ├── GamePreset.cs
│ │ └── GameServiceConfig.cs
│ ├── InvokableActionDto.cs
│ ├── LG
│ │ ├── LgDeviceDto.cs
│ │ ├── LgDeviceOptions.cs
│ │ ├── LgEnums.cs
│ │ ├── LgFields.cs
│ │ ├── LgPreset.cs
│ │ ├── LgPresets.cs
│ │ ├── LgRcDto.cs
│ │ └── LgServiceConfigDto.cs
│ ├── ListViewSortState.cs
│ ├── Module.cs
│ ├── ModuleDto.cs
│ ├── NVIDIA
│ │ ├── NovideoSettings.cs
│ │ ├── NvColorEnhancementSettings.cs
│ │ ├── NvColorProfileSettings.cs
│ │ ├── NvEnums.cs
│ │ ├── NvGpuInfoDto.cs
│ │ ├── NvGpuOcSettings.cs
│ │ ├── NvHdmiInfoFrameSettings.cs
│ │ ├── NvHdrSettings.cs
│ │ ├── NvPreset.cs
│ │ ├── NvProfile.cs
│ │ ├── NvServiceConfig.cs
│ │ ├── NvSettingConstants.cs
│ │ └── NvSettingItemDto.cs
│ ├── PresetStep.cs
│ ├── Presets
│ │ └── PresetBase.cs
│ ├── Rational.cs
│ ├── RemoteControl
│ │ ├── BaseRcButtonDto.cs
│ │ └── BaseRcDto.cs
│ ├── Samsung
│ │ ├── SamsungButtons.cs
│ │ ├── SamsungDeviceDto.cs
│ │ ├── SamsungDeviceOptions.cs
│ │ ├── SamsungEnums.cs
│ │ ├── SamsungFields.cs
│ │ ├── SamsungPreset.cs
│ │ ├── SamsungPresets.cs
│ │ ├── SamsungRcDto.cs
│ │ └── SamsungServiceConfigDto.cs
│ ├── StartUpParams.cs
│ ├── Svc
│ │ ├── SvcMessage.cs
│ │ └── SvcResultMessage.cs
│ └── VirtualResolution.cs
├── EventDispatcher
│ ├── DisplayChangeEventDispatcher.cs
│ ├── EventDispatcher.cs
│ ├── EventExtensions.cs
│ ├── KeyboardShortcutDispatcher.cs
│ ├── PowerEventDispatcher.cs
│ ├── ProcessEventDispatcher.cs
│ ├── SessionSwitchDispatcher.cs
│ └── WindowMessageDispatcher.cs
├── Forms
│ ├── DarkModeUtils.cs
│ ├── FormUtils.cs
│ ├── ListViewColumnSorter.cs
│ ├── MessageForms.cs
│ ├── MessageForms.resx
│ └── TreeNodeBuilder.cs
├── Native
│ ├── CCD.cs
│ ├── CmsFunctions.cs
│ ├── DXWrapper.cs
│ ├── PnpDev.cs
│ ├── RestartDetector.cs
│ └── WinApi.cs
├── Services
│ ├── RpcClientService.cs
│ ├── RpcServerService.cs
│ ├── WinApiAdminService.cs
│ ├── WinApiService.cs
│ ├── WinElevatedProcessManager.cs
│ └── WolService.cs
├── Shared.csproj
├── Themes
│ └── DarkTheme.xaml
└── XForms
│ ├── BaseViewModel.cs
│ └── BaseWindow.xaml.cs
├── images
├── LgController.png
├── NvPresets.png
└── Options.png
└── novideo_srgb
├── AboutWindow.xaml
├── AboutWindow.xaml.cs
├── AdvancedViewModel.cs
├── AdvancedWindow.xaml
├── AdvancedWindow.xaml.cs
├── Colorimetry.cs
├── DisplayConfigManager.cs
├── DoubleToneCurve.cs
├── GammaToneCurve.cs
├── ICCBinaryReader.cs
├── ICCMatrixProfile.cs
├── ICCProfileException.cs
├── Lut16.cs
├── LutToneCurve.cs
├── MainViewModel.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Matrix.cs
├── MonitorData.cs
├── Novideo.cs
├── Properties
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── RangeRule.cs
├── SrgbEOTF.cs
├── ToneCurve.cs
├── icon.ico
└── novideo_srgb.csproj
/ColorControl.UI/Components/Layout/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 | @Body
13 |
14 |
15 |
16 |
17 |
18 | An unhandled error has occurred.
19 |
Reload
20 |
🗙
21 |
22 |
--------------------------------------------------------------------------------
/ColorControl.UI/Components/Layout/TopMenu.razor:
--------------------------------------------------------------------------------
1 | @using ColorControl.Shared.Contracts
2 | @using ColorControl.UI.Services
3 | @inherits LayoutComponentBase
4 |
5 | @inject AppState AppState
6 | @inject NavigationManager _navigationManager;
7 | @rendermode Constants.RenderMode
8 |
9 |
10 | @*
*@
11 |
GitHub
12 |
13 |
14 | @code {
15 |
16 | private string ThemeTransitionName = "Dark";
17 |
18 | protected override void OnInitialized()
19 | {
20 | ThemeTransitionName = AppState.SelectedTheme == "light" ? "Dark theme" : "Light theme";
21 | }
22 |
23 | private void ChangeTheme()
24 | {
25 | AppState.SetTheme(AppState.SelectedTheme == "light" ? "dark" : "light");
26 | ThemeTransitionName = AppState.SelectedTheme == "light" ? "Dark theme" : "Light theme";
27 | _navigationManager.Refresh();
28 | }
29 | }
--------------------------------------------------------------------------------
/ColorControl.UI/Components/Pages/LG/LgSettings.razor:
--------------------------------------------------------------------------------
1 | @using ColorControl.Shared.Contracts
2 | @using ColorControl.Shared.Contracts.LG
3 | @using ColorControl.UI.Services;
4 | @using ColorControl.Shared.Common;
5 | @using ColorControl.UI.Components.Pages.Generic
6 |
7 | @rendermode Constants.RenderMode
8 | @inject RpcUiClientService _rpcClientService
9 |
10 |
11 |
12 | @code {
13 | private LgServiceConfigDto? Config { get; set; }
14 | private List? Fields { get; set; }
15 |
16 | protected async Task ModalOnShow()
17 | {
18 | Config = await _rpcClientService.CallAsync("LgService", "GetConfig");
19 | Fields = LgFields.GetSettingsFields(Config);
20 | StateHasChanged();
21 | }
22 |
23 | private async Task ApplyClick()
24 | {
25 | if (Config == null)
26 | {
27 | return;
28 | }
29 |
30 | FieldDefinition.UpdateObject(Fields, Config);
31 |
32 | var result = await _rpcClientService.CallAsync("LgService", "UpdateConfig", Config);
33 | }
34 | }
--------------------------------------------------------------------------------
/ColorControl.UI/Components/Pages/Samsung/SamsungSettings.razor:
--------------------------------------------------------------------------------
1 | @using ColorControl.Shared.Contracts
2 | @using ColorControl.Shared.Contracts.Samsung
3 | @using ColorControl.UI.Services;
4 | @using ColorControl.Shared.Common;
5 | @using ColorControl.UI.Components.Pages.Generic
6 |
7 | @rendermode Constants.RenderMode
8 | @inject RpcUiClientService _rpcClientService
9 |
10 |
11 |
12 | @code {
13 | private SamsungServiceConfigDto? Config { get; set; }
14 | private List? Fields { get; set; }
15 |
16 | protected async Task ModalOnShow()
17 | {
18 | Config = await _rpcClientService.CallAsync("SamsungService", "GetConfig");
19 | Fields = SamsungFields.GetSettingsFields(Config);
20 | StateHasChanged();
21 | }
22 |
23 | private async Task ApplyClick()
24 | {
25 | if (Config == null)
26 | {
27 | return;
28 | }
29 |
30 | FieldDefinition.UpdateObject(Fields, Config);
31 |
32 | var result = await _rpcClientService.CallAsync("SamsungService", "UpdateConfig", Config);
33 | }
34 | }
--------------------------------------------------------------------------------
/ColorControl.UI/Components/Routes.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ColorControl.UI/Components/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using ColorControl.UI
10 | @using ColorControl.UI.Components
11 |
--------------------------------------------------------------------------------
/ColorControl.UI/Constants.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components;
2 | using Microsoft.AspNetCore.Components.Web;
3 |
4 | public static class Constants
5 | {
6 | public const string Primary = "primary";
7 | public const string Secondary = "secondary";
8 | public const string Success = "success";
9 | public const string Danger = "danger";
10 | public const string Warning = "warning";
11 | public const string Info = "info";
12 | public const string Light = "light";
13 | public const string Dark = "dark";
14 |
15 |
16 | public static IComponentRenderMode RenderMode = new InteractiveServerRenderMode(prerender: false);
17 |
18 | }
--------------------------------------------------------------------------------
/ColorControl.UI/Extensions/GeneralExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
2 | using System.Security.Cryptography;
3 |
4 | namespace ColorControl.UI.Generics;
5 |
6 | public static class GeneralExtensions
7 | {
8 | public static async ValueTask TryGet(this ProtectedBrowserStorage storage, string key, TValue? def = default)
9 | {
10 | try
11 | {
12 | var result = await storage.GetAsync(key);
13 | var value = result.Success ? result.Value : def;
14 |
15 | return value;
16 | }
17 | catch (CryptographicException)
18 | {
19 | await storage.DeleteAsync(key);
20 | return def;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ColorControl.UI/Extensions/PresetExtensions.cs:
--------------------------------------------------------------------------------
1 | using ColorControl.Shared.Contracts;
2 |
3 | namespace ColorControl.UI.Generics;
4 |
5 | public static class PresetExtensions
6 | {
7 | public static List? OrderPresetsBy(this List presets, PresetOrder order) where T : PresetBase
8 | {
9 | if (presets == null)
10 | {
11 | return null;
12 | }
13 |
14 | if (order == PresetOrder.ByName)
15 | {
16 | presets = presets.OrderBy(p => p.name).ToList();
17 | }
18 | else if (order == PresetOrder.ByLastUsed)
19 | {
20 | presets = presets.OrderByDescending(p => p.LastUsed).ToList();
21 | }
22 |
23 | return presets;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ColorControl.UI/NotificationDto.cs:
--------------------------------------------------------------------------------
1 | using NStandard;
2 |
3 | namespace ColorControl.UI;
4 |
5 | public class NotificationDto
6 | {
7 | public long Id { get; }
8 | public string Message { get; }
9 | public string Level { get; } = Constants.Info;
10 | public DateTime? ScheduledAt { get; set; }
11 | public string? InternalUrl { get; set; }
12 | public DateTime? ShownAt { get; set; }
13 |
14 | public NotificationDto(string message, string level = Constants.Info)
15 | {
16 | Message = message;
17 | Level = level;
18 | Id = Random.Shared.NextInt64();
19 | }
20 |
21 | public string Category => Level switch
22 | {
23 | Constants.Danger => "Error",
24 | _ => Level[0].ToUpper() + Level.Substring(1)
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/ColorControl.UI/Program.cs:
--------------------------------------------------------------------------------
1 | //using ColorControl.UI;
2 |
3 | //Blazor.Start();
4 |
5 | //var builder = WebApplication.CreateBuilder(args);
6 |
7 | //// Add services to the container.
8 | //builder.Services.AddRazorComponents()
9 | // .AddInteractiveServerComponents();
10 |
11 | //builder.Services.AddSingleton();
12 | //builder.Services.AddSingleton();
13 |
14 | //var app = builder.Build();
15 |
16 | //// Configure the HTTP request pipeline.
17 | //if (!app.Environment.IsDevelopment())
18 | //{
19 | // app.UseExceptionHandler("/Error", createScopeForErrors: true);
20 | // // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
21 | // app.UseHsts();
22 | //}
23 |
24 | //app.UseHttpsRedirection();
25 |
26 | //app.UseStaticFiles();
27 | //app.UseAntiforgery();
28 |
29 | //app.MapRazorComponents()
30 | // .AddInteractiveServerRenderMode();
31 |
32 | //app.Run();
33 |
--------------------------------------------------------------------------------
/ColorControl.UI/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:31433",
8 | "sslPort": 44330
9 | }
10 | },
11 | "profiles": {
12 | "http": {
13 | "commandName": "Project",
14 | "dotnetRunMessages": true,
15 | "launchBrowser": true,
16 | "applicationUrl": "http://localhost:5175",
17 | "environmentVariables": {
18 | "ASPNETCORE_ENVIRONMENT": "Development"
19 | }
20 | },
21 | "https": {
22 | "commandName": "Project",
23 | "dotnetRunMessages": true,
24 | "launchBrowser": true,
25 | "applicationUrl": "https://localhost:7135;http://localhost:5175",
26 | "environmentVariables": {
27 | "ASPNETCORE_ENVIRONMENT": "Development"
28 | }
29 | },
30 | "IIS Express": {
31 | "commandName": "IISExpress",
32 | "launchBrowser": true,
33 | "environmentVariables": {
34 | "ASPNETCORE_ENVIRONMENT": "Development"
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ColorControl.UI/Services/NotificationService.cs:
--------------------------------------------------------------------------------
1 | namespace ColorControl.UI.Services;
2 |
3 | public class NotificationService
4 | {
5 | public event Func? OnNotification;
6 |
7 | private List _scheduledNotifications = new();
8 |
9 | public void SendNotification(NotificationDto notification)
10 | {
11 | var now = DateTime.UtcNow;
12 | if (notification.ScheduledAt == null || notification.ScheduledAt <= now)
13 | {
14 | OnNotification?.Invoke(notification);
15 |
16 | return;
17 | }
18 |
19 | Task.Run(async () =>
20 | {
21 | await Task.Delay(notification.ScheduledAt.Value - now);
22 |
23 | OnNotification?.Invoke(notification);
24 | });
25 | }
26 |
27 | public async Task SendNotificationDirect(NotificationDto notification)
28 | {
29 | if (OnNotification != null)
30 | {
31 | await OnNotification.Invoke(notification);
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/ColorControl.UI/State/AppState.cs:
--------------------------------------------------------------------------------
1 | namespace ColorControl.UI;
2 |
3 | public class AppState
4 | {
5 | public string SelectedTheme { get; set; } = "light";
6 |
7 | public event Action? OnChange;
8 |
9 | public void SetTheme(string theme)
10 | {
11 | SelectedTheme = theme;
12 | NotifyStateChanged();
13 | }
14 |
15 | private void NotifyStateChanged() => OnChange?.Invoke();
16 | }
17 |
--------------------------------------------------------------------------------
/ColorControl.UI/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/ColorControl.UI/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/favicon.png
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/helper.js:
--------------------------------------------------------------------------------
1 | export function FormValid(formId) {
2 | let form = document.getElementById(formId);
3 | return form.checkValidity();
4 | }
5 |
6 | export function CloseModal(modalId) {
7 | bootstrap.Modal.getOrCreateInstance('#' + modalId)?.hide();
8 | }
9 |
10 | export function OpenModal(modalId) {
11 | bootstrap.Modal.getOrCreateInstance('#' + modalId)?.show();
12 | }
13 |
14 | export function ShowToast(toastId) {
15 | const toastBootstrap = bootstrap.Toast.getOrCreateInstance('#' + toastId);
16 | toastBootstrap?.show();
17 | }
18 |
19 | export function GetElementDimensions(elementId) {
20 | return document.getElementById(elementId).getBoundingClientRect();
21 | }
22 |
23 | export function GetElementClassName(elementId) {
24 | return document.getElementById(elementId).className;
25 | }
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/remotes/LG_FactorySVC.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_FactorySVC.jpg
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/remotes/LG_MR20GA.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_MR20GA.jpg
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/remotes/LG_MR23GN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/LG_MR23GN.jpg
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/remotes/Samsung_AA81-00243A.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/Samsung_AA81-00243A.jpg
--------------------------------------------------------------------------------
/ColorControl.UI/wwwroot/remotes/Samsung_BN59-01315B.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl.UI/wwwroot/remotes/Samsung_BN59-01315B.jpg
--------------------------------------------------------------------------------
/ColorControl/.upgrade-assistant:
--------------------------------------------------------------------------------
1 | {"Build":"0.3.261602\u002Befb3cc30a24e699e6e4337f263a2b9478f04f618","CurrentProject":"ColorControl.csproj","EntryPoints":["ColorControl.csproj"],"Properties":{}}
--------------------------------------------------------------------------------
/ColorControl/IModulePanel.cs:
--------------------------------------------------------------------------------
1 | namespace ColorControl
2 | {
3 | internal interface IModulePanel
4 | {
5 | public void UpdateInfo();
6 | public void Init();
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/ColorControl/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "ColorControl": {
4 | "commandName": "Project"
5 | }
6 | }
7 | }
--------------------------------------------------------------------------------
/ColorControl/Resources/LG_remote.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl/Resources/LG_remote.jpg
--------------------------------------------------------------------------------
/ColorControl/Resources/RC_coords.txt:
--------------------------------------------------------------------------------
1 | Power;120;136
2 | 1;106;228
3 | 2;196;228
4 | 3;286;228
5 | 4;106;296
6 | 5;196;296
7 | 6;286;296
8 | 7;106;362
9 | 8;196;362
10 | 9;286;362
11 | List;106;425
12 | 0;196;425
13 | SAP;286;425
14 | Vol +;98;513
15 | Mute;198;513
16 | Channel +;298;513
17 | Vol -;98;622
18 | Channel -;298;622
19 | Home;78;695
20 | Settings;318;695
21 | Up;200;748
22 | Left;98;852
23 | Enter;200;852
24 | Right;304;852
25 | Down;200;952
26 | Back;80;1000
27 | TV Guide;320;1000
28 | Netflix;92;1076
29 | Inputs;200;1066
30 | Amazon Prime;312;1076
31 | Red;90;1150
32 | Green;164;1150
33 | Yellow;240;1150
34 | Blue;316;1150
35 | Rakuten TV;116;1218
36 | Play;202;1218
37 | Pause;291;1218
--------------------------------------------------------------------------------
/ColorControl/Resources/pngbarn.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/ColorControl/Resources/pngbarn.ico
--------------------------------------------------------------------------------
/ColorControl/Services/AMD/AmdDisplayInfo.cs:
--------------------------------------------------------------------------------
1 | using ATI.ADL;
2 | using System.Collections.Generic;
3 |
4 | namespace ColorControl.Services.AMD;
5 |
6 | class AmdDisplayInfo
7 | {
8 | public ADLDisplayInfo Display { get; }
9 |
10 | public List Values { get; set; }
11 |
12 | public string InfoLine { get; set; }
13 |
14 | public AmdDisplayInfo(ADLDisplayInfo display, List values, string infoLine)
15 | {
16 | Display = display;
17 | Values = values;
18 | InfoLine = infoLine;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ColorControl/Services/Common/IServiceBase.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ColorControl.Services.Common;
4 |
5 | public interface IServiceBase
6 | {
7 | List GetInfo();
8 | void InstallEventHandlers();
9 | }
10 |
--------------------------------------------------------------------------------
/ColorControl/Services/Samsung/ISamsungService.cs:
--------------------------------------------------------------------------------
1 | using ColorControl.Shared.Contracts.Samsung;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace ColorControl.Services.Samsung
6 | {
7 | internal interface ISamsungService
8 | {
9 | SamsungServiceConfig Config { get; }
10 | List Devices { get; }
11 | SamsungDevice SelectedDevice { get; set; }
12 | string ServiceName { get; }
13 |
14 | Task ApplyPreset(SamsungPreset preset);
15 | Task ApplyPreset(string idOrName);
16 | SamsungDevice GetPresetDevice(SamsungPreset preset);
17 | void GlobalSave();
18 | Task RefreshDevices(bool connect = true, bool afterStartUp = false);
19 | }
20 | }
--------------------------------------------------------------------------------
/ColorControl/Services/Samsung/RawRequestMessage.cs:
--------------------------------------------------------------------------------
1 |
2 | using Newtonsoft.Json;
3 |
4 | namespace ColorControl.Services.Samsung
5 | {
6 | internal class RawRequestMessage
7 | {
8 | public RawRequestMessage(RequestMessage rm, int commandCount)
9 | {
10 | Id = commandCount.ToString();
11 | Method = rm.Method;
12 | Params = rm.Params;
13 | }
14 |
15 | [JsonIgnore]
16 | public string Id { get; set; }
17 |
18 | [JsonProperty("method")]
19 | public string Method { get; set; }
20 | [JsonProperty("params")]
21 | public object Params { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/ColorControl/Services/Samsung/RequestMessage.cs:
--------------------------------------------------------------------------------
1 | namespace ColorControl.Services.Samsung
2 | {
3 | public class RequestMessage
4 | {
5 | public RequestMessage(string method, object payload)
6 | {
7 | Method = method;
8 | Params = payload;
9 | }
10 |
11 | public string Method { get; set; }
12 | public object Params { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/ColorControl/Services/Samsung/SamsungApp.cs:
--------------------------------------------------------------------------------
1 | namespace ColorControl.Services.Samsung
2 | {
3 | public class SamsungApp
4 | {
5 | public string Title { get; set; }
6 | public string AppId { get; set; }
7 |
8 | public SamsungApp(string appId, string title)
9 | {
10 | AppId = appId;
11 | Title = title;
12 | }
13 |
14 | public override string ToString()
15 | {
16 | return Title;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ColorControl/XForms/BrowserWindow.xaml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
20 |
21 |
--------------------------------------------------------------------------------
/ColorControl/lgtv/App.cs:
--------------------------------------------------------------------------------
1 | namespace LgTv
2 | {
3 | public class App
4 | {
5 | public string Id { get; set; }
6 | public string LaunchPointId { get; set; }
7 | public string Icon { get; set; }
8 | public string Title { get; set; }
9 |
10 | }
11 | }
--------------------------------------------------------------------------------
/ColorControl/lgtv/Channel.cs:
--------------------------------------------------------------------------------
1 | namespace LgTv
2 | {
3 | public class Channel
4 | {
5 | public string Id { get; set; }
6 | public int Number { get; set; }
7 | public string Name { get; set; }
8 |
9 | }
10 | }
--------------------------------------------------------------------------------
/ColorControl/lgtv/ExternalInput.cs:
--------------------------------------------------------------------------------
1 | namespace LgTv
2 | {
3 | public class ExternalInput
4 | {
5 | public ExternalInput(string id,string label)
6 | {
7 | Id = id;
8 | Label = label;
9 | }
10 | public string Id { get; set; }
11 | public string Label { get; set; }
12 | public string Icon { get; set; }
13 |
14 | }
15 | }
--------------------------------------------------------------------------------
/ColorControl/lgtv/LgApp.cs:
--------------------------------------------------------------------------------
1 | namespace LgTv
2 | {
3 | public class LgApp
4 | {
5 | public string title { get; set; }
6 | public string appId { get; set; }
7 |
8 | public LgApp(string appId, string title)
9 | {
10 | this.appId = appId;
11 | this.title = title;
12 | }
13 |
14 | public override string ToString()
15 | {
16 | return title;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ColorControl/lgtv/README.md:
--------------------------------------------------------------------------------
1 | # lgtv.net
2 | LG TV WebOS API for .NET
3 |
4 | For now, there is only API, example app will be added in the future.
5 |
6 | ## inspiration:
7 | * https://github.com/msloth/lgtv.js/blob/master/lgtv.js
8 |
9 | ## references:
10 | * https://github.com/ConnectSDK/Connect-SDK-Android-Core
11 | * https://github.com/CODeRUS/harbour-lgremote-webos
12 | * https://github.com/openwebos
13 | * https://mym.hackpad.com/ep/pad/static/rLlshKkzdNj
14 |
15 | ## Usage
16 | ```C#
17 | // Initalization
18 | var _instance = new LgTvApi(ip,new LgTvApiCore(), new ClientKeyStore(ip));
19 | await _instance.Connect();
20 | await _instance.MakeHandShake();
21 | await _instance.GetMouse();
22 |
23 | //control
24 | await _instance.VolumeDown();
25 | await _instance.TurnOff();
26 | ......
27 | (await _instance.GetMouse()).SendButton(ButtonType.RED);
28 | (await _instance.GetMouse()).SendButton(ButtonType.LEFT);
29 | ..
30 | ```
31 |
--------------------------------------------------------------------------------
/ColorControl/lgtv/RawRequestMessage.cs:
--------------------------------------------------------------------------------
1 | namespace LgTv
2 | {
3 | internal class RawRequestMessage
4 | {
5 | public RawRequestMessage(RequestMessage rm, int commandCount)
6 | {
7 | var prefix = (rm.Prefix ?? "");
8 | Id = prefix + (prefix.Length>0?"_":"") + commandCount;
9 | Type = rm.Type??"request";
10 | Uri = rm.Uri;
11 | Payload = rm.Payload;
12 | }
13 | public string Id { get; set; }
14 | public string Type { get; set; }
15 | public string Uri { get; set; }
16 | public string Payload { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/ColorControl/lgtv/RequestMessage.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace LgTv
4 | {
5 | public class RequestMessage
6 | {
7 | public RequestMessage(string prefix, string uri)
8 | {
9 | Prefix = prefix;
10 | Uri = uri;
11 | }
12 | public RequestMessage(string uri, object payload, string type = "request")
13 | {
14 | Uri = uri;
15 | if (payload != null)
16 | {
17 | Payload = JsonConvert.SerializeObject(payload);
18 | }
19 | Type = type;
20 | }
21 |
22 | public string Prefix { get; set; }
23 | public string Type { get; set; }
24 | public string Uri { get; set; }
25 | public string Payload { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/LICENSE-NOVIDEO.txt:
--------------------------------------------------------------------------------
1 | ColorControl (this application) contains customized code of the app "Novideo sRGB" by ledoge (https://github.com/ledoge/novideo_srgb)
2 |
3 | The included license of ColorControl (GNU General Public License v3.0) covers all rights.
--------------------------------------------------------------------------------
/LittleCms/CmsExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LittleCms
8 | {
9 | public static class CmsExtension
10 | {
11 |
12 | public static CIExyY ToCIExyY(this CIEXYZ xyz)
13 | {
14 | return new CIExyY { x = xyz.X / (xyz.X + xyz.Y + xyz.Z), y = xyz.Y / (xyz.X + xyz.Y + xyz.Z), Y = xyz.Y };
15 | }
16 | public static CIExyY ToXY(this CIEXYZ xyz)
17 | {
18 | var sum = xyz.X + xyz.Y + xyz.Z;
19 | return new() { x = xyz.X / sum, y = xyz.Y / sum, Y = 1 };
20 | }
21 |
22 | public static CIEXYZ ToXYZ(this CIExyY xyY)
23 | {
24 | return new() { X = xyY.x * xyY.Y / xyY.y, Y = xyY.Y, Z = (1 - xyY.x - xyY.y) * xyY.Y / xyY.y };
25 | }
26 |
27 | public static int GetChannelCount(this ColorSpaceSignature sig)
28 | {
29 | return (int)CmsNative.cmsChannelsOf(sig);
30 | }
31 |
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/LittleCms/CmsGlobal.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace LittleCms
6 | {
7 | public class CmsGlobal
8 | {
9 |
10 | public static CIEXYZ D50XYZ { get; } = CmsNative.cmsD50_XYZ();
11 | public static CIExyY D50xyY { get; } = CmsNative.cmsD50_xyY();
12 |
13 |
14 | public unsafe static CIEXYZ AdaptToIlluminant(in CIEXYZ SourceWhitePt, in CIEXYZ Illuminant, in CIEXYZ Value)
15 | {
16 | CmsNative.CheckError(CmsNative.cmsAdaptToIlluminant(out var result, SourceWhitePt, Illuminant, Value));
17 | return result;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/LittleCms/CmsObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace LittleCms
4 | {
5 | public abstract class CmsObject
6 | {
7 | private IntPtr handle;
8 | private bool isOwner;
9 |
10 | public IntPtr Handle => handle;
11 | public bool IsOwner => isOwner;
12 |
13 | public abstract CmsContext Context { get; }
14 |
15 |
16 | protected CmsObject() { }
17 |
18 | protected CmsObject(IntPtr handle, bool moveOwnership)
19 | {
20 | AttachObject(handle, isOwner);
21 | }
22 |
23 |
24 | protected void AttachObject(IntPtr handle, bool moveOwnership)
25 | {
26 | if (handle != IntPtr.Zero && isOwner)
27 | {
28 | FreeObject();
29 | }
30 | if (handle == IntPtr.Zero)
31 | {
32 | throw new NullReferenceException();
33 | }
34 | this.handle = handle;
35 | this.isOwner = moveOwnership;
36 | }
37 |
38 | ~CmsObject() {
39 | if (handle != IntPtr.Zero && isOwner) {
40 | FreeObject();
41 | }
42 | }
43 |
44 | protected abstract void FreeObject();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/LittleCms/Data/BlittableDataTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace LittleCms.Data
5 | {
6 | internal record BlittableDataTag(TagSignature TagSignature) : ISafeTagSignature where T : unmanaged
7 | {
8 | public unsafe T ReadFromProfile(IccProfile profile)
9 | {
10 | var ptr = profile.ReadTag(TagSignature);
11 | if (ptr == null) throw new TagNotFoundException();
12 | return *(T*)ptr;
13 | }
14 |
15 | public unsafe void WriteToProfile(IccProfile profile, T data)
16 | {
17 | profile.WriteTag(TagSignature, &data);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/LittleCms/Data/ChromaticAdaptationTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Numerics;
5 | using System.Runtime.InteropServices;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace LittleCms.Data
10 | {
11 | internal class ChromaticAdaptationTagSignature : ISafeTagSignature
12 | {
13 | public TagSignature TagSignature => TagSignature.ChromaticAdaptationTag;
14 |
15 | public unsafe double[,] ReadFromProfile(IccProfile profile)
16 | {
17 | var ptr = (double*)profile.ReadTag(TagSignature);
18 | if (ptr == null) throw new TagNotFoundException();
19 | var result = new double[3, 3];
20 | new ReadOnlySpan(ptr, 9).CopyTo(MemoryMarshal.CreateSpan(ref result[0, 0], 9));
21 | return result;
22 | }
23 |
24 | public unsafe void WriteToProfile(IccProfile profile, double[,] data)
25 | {
26 | if (data == null) throw new ArgumentNullException(nameof(data));
27 | fixed (double* ptr = &data[0, 0])
28 | profile.WriteTag(TagSignature, ptr);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LittleCms/Data/ISafeTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LittleCms.Data
8 | {
9 | public interface ISafeTagSignature
10 | {
11 | TagSignature TagSignature { get; }
12 | T ReadFromProfile(IccProfile profile);
13 | void WriteToProfile(IccProfile profile, T data);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/LittleCms/Data/IccDataTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LittleCms.Data
8 | {
9 | internal record IccDataTagSignature(TagSignature TagSignature) : ISafeTagSignature
10 | {
11 | public unsafe ICCData ReadFromProfile(IccProfile profile)
12 | {
13 | var ptr = profile.ReadTag(TagSignature);
14 | if (ptr == null) throw new TagNotFoundException();
15 | return _ICCData.ToManaged((_ICCData*)ptr);
16 | }
17 |
18 | public unsafe void WriteToProfile(IccProfile profile, ICCData obj)
19 | {
20 | var data = new byte[sizeof(_ICCDataHeader) + obj.Data.Length];
21 | obj.Data.Span.CopyTo(data.AsSpan().Slice(sizeof(_ICCDataHeader)));
22 | fixed (byte* ptr = data)
23 | {
24 | var header = (_ICCDataHeader*)ptr;
25 | header->flag = obj.Flag;
26 | header->len = (uint)obj.Data.Length;
27 |
28 | profile.WriteTag(TagSignature, ptr);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/LittleCms/Data/MluTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LittleCms.Data
8 | {
9 | internal record MluTagSignature(TagSignature TagSignature) : ISafeTagSignature
10 | {
11 | public unsafe MLU ReadFromProfile(IccProfile profile)
12 | {
13 | var ptr = profile.ReadTag(TagSignature);
14 | if (ptr == null) throw new TagNotFoundException();
15 | return MLU.CopyFromObject((IntPtr)ptr);
16 | }
17 |
18 | public unsafe void WriteToProfile(IccProfile profile, MLU data)
19 | {
20 | if (data == null) throw new ArgumentNullException(nameof(data));
21 | profile.WriteTag(TagSignature, (void*)data.Handle);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/LittleCms/Data/RgbToneCurve.cs:
--------------------------------------------------------------------------------
1 | namespace LittleCms.Data
2 | {
3 | public record RgbToneCurve(ToneCurve Red, ToneCurve Green, ToneCurve Blue)
4 | {
5 | public ToneCurve[] ToArray() => new[] { Red, Green, Blue };
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/LittleCms/Data/TagNotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.Serialization;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace LittleCms.Data
9 | {
10 | public class TagNotFoundException : Exception
11 | {
12 | private const int hr = unchecked((int)0x80131577);
13 | public TagNotFoundException()
14 | {
15 | HResult = hr;
16 | }
17 |
18 | public TagNotFoundException(string message) : base(message)
19 | {
20 | HResult = hr;
21 |
22 | }
23 | public TagNotFoundException(string? message, Exception? innerException)
24 | : base(message, innerException)
25 | {
26 | HResult = hr;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/LittleCms/Data/ToneCurveTagSignature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace LittleCms.Data
8 | {
9 | internal record ToneCurveTagSignature(TagSignature TagSignature) : ISafeTagSignature
10 | {
11 | public unsafe ToneCurve ReadFromProfile(IccProfile profile)
12 | {
13 | var ptr = profile.ReadTag(TagSignature);
14 | if (ptr == null) throw new TagNotFoundException();
15 | return ToneCurve.CopyFromObject((IntPtr)ptr);
16 | }
17 |
18 | public unsafe void WriteToProfile(IccProfile profile, ToneCurve data)
19 | {
20 | if (data == null) throw new ArgumentNullException(nameof(data));
21 | profile.WriteTag(TagSignature, (void*)data.Handle);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/LittleCms/LittleCms.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0-windows
5 | enable
6 | True
7 |
8 |
9 |
10 |
11 | PreserveNewest
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/LittleCms/lcms2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Maassoft/ColorControl/827157f30f5035997e918cc2a151ca5edad2449e/LittleCms/lcms2.dll
--------------------------------------------------------------------------------
/MHC2Gen/DisplayEnums.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace MHC2Gen;
4 |
5 | public enum SaveOption
6 | {
7 | Install,
8 | [Description("Install and associate to display")]
9 | InstallAndAssociate,
10 | [Description("Install and set as display default")]
11 | InstallAndSetAsDefault,
12 | [Description("Save to file")]
13 | SaveToFile
14 | }
15 |
16 | public enum DisplayPrimariesSource
17 | {
18 | Custom,
19 | EDID,
20 | Windows,
21 | ColorProfile,
22 | }
23 |
24 | public enum SDRTransferFunction
25 | {
26 | [Description("BT.1886")]
27 | BT_1886 = 0,
28 | [Description("Pure Power")]
29 | PurePower = 1,
30 | [Description("Piecewise")]
31 | Piecewise = 2,
32 | [Description("Tone Mapped Piecewise")]
33 | ToneMappedPiecewise = 3
34 | }
35 |
36 | public enum ColorGamut
37 | {
38 | Native = 0,
39 | sRGB = 1,
40 | P3 = 2,
41 | Rec2020 = 3,
42 | AdobeRGB = 4
43 | }
44 |
--------------------------------------------------------------------------------
/MHC2Gen/Extension.cs:
--------------------------------------------------------------------------------
1 | using LittleCms;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace MHC2Gen
9 | {
10 | internal static class Extension
11 | {
12 |
13 | public static CIExy ToXY(in this CIExyY xyY)
14 | {
15 | return new() { x = xyY.x, y = xyY.y };
16 | }
17 | public static CIExy ToXY(in this CIEXYZ xyz)
18 | {
19 | return xyz.ToCIExyY().ToXY();
20 | }
21 |
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/MHC2Gen/GenerateProfileCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace MHC2Gen;
4 |
5 | public class GenerateProfileCommand
6 | {
7 | public string Description { get; set; } = "";
8 | public bool HasExtraInfo { get; set; }
9 | public bool IsHDRProfile { get; set; }
10 | public RgbPrimaries DevicePrimaries { get; set; } = new RgbPrimaries(RgbPrimaries.sRGB);
11 | public SDRTransferFunction SDRTransferFunction { get; set; }
12 | public ColorGamut ColorGamut { get; set; }
13 | public double MinCLL { get; set; }
14 | public double MaxCLL { get; set; }
15 | public double WhiteLuminance { get; set; } = 2000;
16 | public double BlackLuminance { get; set; }
17 | public double SDRMinBrightness { get; set; }
18 | public double SDRMaxBrightness { get; set; } = 100;
19 | public double SDRBrightnessBoost { get; set; }
20 | public double ShadowDetailBoost { get; set; }
21 | public double Gamma { get; set; } = 2.2;
22 |
23 | public double ToneMappingFromLuminance { get; set; }
24 | public double ToneMappingToLuminance { get; set; }
25 |
26 | public double HdrGammaMultiplier { get; set; }
27 | public double HdrBrightnessMultiplier { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/MHC2Gen/ST2084.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace MHC2Gen
8 | {
9 | internal class ST2084
10 | {
11 | private const double m1 = 2610.0 / 16384.0;
12 | private const double m2 = 128.0 * 2523.0 / 4096.0;
13 | private const double c1 = 3424.0 / 4096.0;
14 | private const double c2 = 32.0 * 2413.0 / 4096.0;
15 | private const double c3 = 32.0 * 2392.0 / 4096.0;
16 |
17 | public static double NitsToSignal(double nits)
18 | {
19 | var Ypowm1 = Math.Pow(nits / 10000.0, m1);
20 | return Math.Pow((c1 + c2 * Ypowm1) / (1 + c3 * Ypowm1), m2);
21 | }
22 |
23 | public static double SignalToNits(double signal)
24 | {
25 | var Epow1divm2 = Math.Pow(signal, 1.0 / m2);
26 | return 10000 * Math.Pow(Math.Max(Epow1divm2 - c1, 0) / (c2 - c3 * Epow1divm2), 1 / m1);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/NLogViewer/ActionCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 |
4 | namespace DJ
5 | {
6 | public sealed class ActionCommand : ICommand
7 | {
8 | private readonly Action _Action;
9 | private readonly Action